public function is($node)
{
if ($node instanceof self) {
$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);
}