FluentDOM\Xpath::__construct PHP Метод

__construct() публичный Метод

HHVM and some old PHP versions do not have a $document property by default Add it is added if it was not found after executing parent constructor.
public __construct ( DOMDocument $dom )
$dom DOMDocument
    public function __construct(\DOMDocument $dom)
    {
        parent::__construct($dom);
        // store the document reference to avoid optimization to DOMDocument
        $this->_documentReference = $dom;
        // @codeCoverageIgnoreStart
        if (!isset($this->document)) {
            $this->document = $dom;
        }
        // @codeCoverageIgnoreEnd
    }