Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: patTemplate

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5
Source code for file /pattemplate/patTemplate/Function/Attribute.php

Documentation is available at Attribute.php

  1. <?PHP
  2. /**
  3.  * patTemplate function to dynamically change the
  4.  * value of _any_ attribute of the parent tag.
  5.  *
  6.  * $Id: Attribute.php 252 2004-07-08 20:59:00Z schst $
  7.  *
  8.  * @package        patTemplate
  9.  * @subpackage    Functions
  10.  * @author        Stephan Schmidt <[email protected]>
  11.  */
  12.  
  13. // Check to ensure this file is within the rest of the framework
  14. defined('JPATH_BASE'or die();
  15.  
  16. /**
  17.  * patTemplate function to dynamically change the
  18.  * value of _any_ attribute of the parent tag.
  19.  *
  20.  * Possible attributes:
  21.  * - name => name of the attribute to change
  22.  *
  23.  * The enclosed data will be used as the value of the attribute.
  24.  *
  25.  * $Id: Attribute.php 252 2004-07-08 20:59:00Z schst $
  26.  *
  27.  * @package        patTemplate
  28.  * @subpackage    Functions
  29.  * @author        Stephan Schmidt <[email protected]>
  30.  */
  31. {
  32.    /**
  33.     * name of the function
  34.     * @access    private
  35.     * @var        string 
  36.     */
  37.     var $_name    =    'Attribute';
  38.  
  39.    /**
  40.     * call the function
  41.     *
  42.     * @access    public
  43.     * @param    array    parameters of the function (= attributes of the tag)
  44.     * @param    string    content of the tag
  45.     * @return    string    content to insert into the template
  46.     */
  47.     function call$params$content )
  48.     {
  49.         ifisset$params['name') )
  50.         {
  51.             $this->_reader->_addToParentTag'attributes'$content$params['name');
  52.         }
  53.         return '';
  54.     }
  55. }
  56. ?>

Documentation generated on Mon, 05 Mar 2007 20:52:40 +0000 by phpDocumentor 1.3.1