public function is($node)
    {
        if ($node instanceof Element) {
            $node = $node->getNode();
        }

        if (!$node instanceof DOMNode) {
            throw new InvalidArgumentException(sprintf('Argument 1 passed to %s must be an instance of %s or DOMNode, %s given', __METHOD__, __CLASS__, (is_object($node) ? get_class($node) : gettype($node))));
        }

        return $this->node->isSameNode($node);
    }
public function is($node)
    {
        if ($node instanceof Element) {
            $node = $node->getNode();
        }

        if (!$node instanceof DOMNode) {
            throw new InvalidArgumentException(sprintf('Argument 1 passed to %s must be an instance of %s or DOMNode, %s given', __METHOD__, __CLASS__, (is_object($node) ? get_class($node) : gettype($node))));
        }

        return $this->node->isSameNode($node);
    }
public function is ( $ node ) { if ( $ node instanceof Element ) { $ node = $ node -> getNode ( ) ; } if ( ! $ node instanceof DOMNode ) { throw new InvalidArgumentException ( sprintf ( 'Argument 1 passed to %s must be an instance of %s or DOMNode, %s given' , __METHOD__ , __CLASS__ , ( is_object ( $ node ) ? get_class ( $ node ) : gettype ( $ node ) ) ) ) ; } return $ this -> node -> isSameNode ( $ node ) ; }
Indicates if two nodes are the same node.

@param \DiDom\Element|\DOMNode $node

@return bool

@throws \InvalidArgumentException if the provided argument is not an instance of \DOMNode
Indicates if two nodes are the same node .