setNode() protected méthode

Sets current \DOMNode instance.
protected setNode ( DOMElement | DOMText | DOMComment $node ) : Element
$node DOMElement | DOMText | DOMComment
Résultat Element
Exemple #1
0
 /**
  * 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);
 }