/** * @param string|array $expression * @param null|\DOMNode|\DOMDocument|Document|Html|Table|Form|Attr|Element|Tag|Field|Text|Cdata|Comment $contextnode * @param bool $registerNodeNS * * @return Set */ public function query($expression, \DOMNode $contextnode = null, $registerNodeNS = true) { $prepared = $this->expression($expression); $result = @parent::query($prepared, $contextnode, $registerNodeNS); $this->doc->debug(array('result', $expression, $prepared, $result)); return $this->doc->set($result); }
/** * @return Element|Tag|Field */ public function parent() { if ($this->parentNode instanceof \DOMNode) { return $this->parentNode; } $this->ownerDocument->debug($this); $parent = $this->ownerDocument->createElement('fix_parent'); $parent->appendChild($this); return $parent; }