CoreFiles by mySites.guru
Attribute.php57 lines, 1,327 bytes, from Joomla_1.5.21-Stable-Full_Package.zip
Raw History Compare with 1.5.20
md5
8dab0d80f288ce0b13af57ff2412da5e
sha1
8b683e67923c033648d6f6a3f766499387489567
sha256
176bee60a81e0445ac2764e828923d9a768f221aba52a0f5ec9fc21015356567
<?PHP
/**
 * patTemplate function to dynamically change the
 * value of _any_ attribute of the parent tag.
 *
 * $Id: Attribute.php 10381 2008-06-01 03:35:53Z pasamio $
 *
 * @package		patTemplate
 * @subpackage	Functions
 * @author		Stephan Schmidt <[email protected]>
 */

// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();

/**
 * patTemplate function to dynamically change the
 * value of _any_ attribute of the parent tag.
 *
 * Possible attributes:
 * - name => name of the attribute to change
 *
 * The enclosed data will be used as the value of the attribute.
 *
 * $Id: Attribute.php 10381 2008-06-01 03:35:53Z pasamio $
 *
 * @package		patTemplate
 * @subpackage	Functions
 * @author		Stephan Schmidt <[email protected]>
 */
class patTemplate_Function_Attribute extends patTemplate_Function
{
	/**
	* name of the function
	* @access	private
	* @var		string
	*/
	var $_name	=	'Attribute';

	/**
	* call the function
	*
	* @access	public
	* @param	array	parameters of the function (= attributes of the tag)
	* @param	string	content of the tag
	* @return	string	content to insert into the template
	*/
	function call( $params, $content )
	{
		if( isset( $params['name'] ) )
		{
			$this->_reader->_addToParentTag( 'attributes', $content, $params['name'] );
		}
		return '';
	}
}
?>

The same content is in 23 releases, Joomla 1.5.4 to 1.5.26. See them all, or every version of this file.