Sets current \DOMNode instance.
protected setNode ( DOMElement | DOMText | DOMComment $node ) : |
||
$node | DOMElement | DOMText | DOMComment | |
return |
/** * Sets current \DOMElement instance. * * @param \DOMElement $node A \DOMElement instance * * @throws \LogicException If given node is not an anchor */ protected function setNode(\DOMElement $node) { if ('a' !== $node->nodeName and 'area' !== $node->nodeName and 'link' !== $node->nodeName) { throw new \LogicException(sprintf('Unable to navigate from a "%s" tag.', $node->nodeName)); } parent::setNode($node); }