public __construct ( string | array $tag, |
||
$tag | string | array | Name of the tag, or array with taginfo (array( 'tag_name' => 'tag', 'self_close' => false, 'attributes' => array('attribute' => 'value'))) |
$parent | Parent of node, null if none |
function __construct($tag, $parent)
{
$this->parent = $parent;
if (is_string($tag)) {
$this->tag = $tag;
} else {
$this->tag = $tag['tag_name'];
$this->self_close = $tag['self_close'];
$this->attributes = $tag['attributes'];
}
}