pQuery\DomNode::__construct PHP Method

__construct() public method

Class constructor
public __construct ( string | array $tag, DomNode $parent )
$tag string | array Name of the tag, or array with taginfo (array( 'tag_name' => 'tag', 'self_close' => false, 'attributes' => array('attribute' => 'value')))
$parent DomNode 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'];
        }
    }
DomNode