pQuery\EmbeddedNode::__construct PHP Méthode

__construct() public méthode

Class constructor
public __construct ( DomNode $parent, string $tag_char = '', string $tag = '', string $text = '', array $attributes = [] )
$parent DomNode
$tag_char string {@link $tag_char}
$tag string {@link $tag}
$text string
$attributes array array('attr' => 'val')
    function __construct($parent, $tag_char = '', $tag = '', $text = '', $attributes = array())
    {
        $this->parent = $parent;
        $this->tag_char = $tag_char;
        if ($tag[0] !== $this->tag_char) {
            $tag = $this->tag_char . $tag;
        }
        $this->tag = $tag;
        $this->text = $text;
        $this->attributes = $attributes;
        $this->self_close_str = $tag_char;
    }