CoreFiles by mySites.guru
Attribute.php57 lines, 1,383 bytes, from Joomla_1.5.3-Stable-Full_Package.zip
Raw History Compare with 1.5.2
md5
db7b41098bbfb86cebc7bb85c17e92c3
sha1
aaa1d4326074f4acc8477c8b7da2496ad0c64b82
sha256
f74ed75cdb7c862025f883f53fe480458e28a0c2e19132080ac71ea9aa5cbbe5
<?PHP
/**
 * patTemplate function to dynamically change the
 * value of _any_ attribute of the parent tag.
 *
 * $Id: Attribute.php 8287 2007-08-01 08:38:59Z eddieajau $
 *
 * @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 8287 2007-08-01 08:38:59Z eddieajau $
 *
 * @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 4 releases, Joomla 1.5.0 to 1.5.3. See them all, or every version of this file.