Location: PHPKode > scripts > UI Template > ui-template/frea/Template/Dom/Node/Attribute.php
<?php
/**
 * Template dom attribute node class
 *
 * @package frea-framework
 * @subpackage Template
 * 
 * @copyright 2009 frea-framework
 * @author Dawid Kraczkowski hide@address.com
 * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
 */
class Template_Dom_Node_Attribute extends Template_Dom_Node 
{
	/**
	 * value of attribute
	 *
	 * @var string
	 */
	protected $value;
	
	/**
	 * constructor
	 *
	 * @param string $nodeName
	 * @param string $nodeValue
	 */
	public function __construct($nodeName , $nodeValue="")
	{
		$this->nodeType = Template_Dom_Node::ATTRIBUTE_NODE;
		$this->nodeName = $nodeName;
		$this->value = $nodeValue;
	}
	/**
	 * return value of attribute
	 *
	 * @return string
	 */
	public function value($value = null)
	{
		if($value)
			$this->value = $value;
		else
			return $this->value;
	}
	/**
	 * return value of attribute
	 *
	 * @return string
	 */
	public function __toString()
	{
		return $this->value;
	}

}
Return current item: UI Template