/**
* Node constructor.
*
* @access public
*/
public function __construct()
{
// init the parent
parent::__construct();
// init the user object and the attributes
$this->userObject = null;
$this->attributes = null;
$this->content = null;
}
/**
* Method to set the user object.
*
* @access public
* @final
* @param object <b>$userObject</b> The user custom object
* @return void
*/
public final function setUserObject(&$userObject)
{
// set the object to the class member
$this->userObject = $userObject;
}
/**
* Method to set the current attributes
*
* @access public
* @final
* @param array <b>$attributes</b> List of the attributes
* @return void
*/
public final function setAttributes(&$attributes)
{
// set the current node's attributes to the class memeber
if (is_array($attributes))
$this->attributes = $attributes;
}
/**
* Method to set the content of the node.
*
* @access public
* @final
* @param string <b>$content</b> The content of the node
* @return void
*/
public final function setContent($content)
{
// set the content of the node
$this->content = $content;
}
/**
* Method to reset the attributes to a null value.
*
* @access public
* @final
* @return void
*/
public final function resetAttributes()
{
// reset to null
$this->attributes = null;
}
/**
* Reset the node content to a null value
*
* @access public
* @final
* @return void
*/
public final function resetContent()
{
// reset the content
$this->content = null;
}
/**
* Method to be called when the node starts.
* It will be overwritten by every node implementation
*
* @access public
* @abstract
* @return void
*/
public abstract function onOpen();
/**
* Method to be called when the tag is complete (short form).
*
* @access public
* @return void
*/
public function onComplete()
{
// call the open method
$this->onOpen();
// call the close method
$this->onClose();
}
/**
* Method to be called when the tag is closed.
* It will be overwritten by every node implementation.
*
* @access public
* @abstract
*/
public abstract function onClose();
/**
* Class destructor.
*/
function __destruct()
{