public function getHandler($node, $index = -1)
    {
        if ($node instanceof \DOMElement) {
            return $this->getElementHandler($node, $this, $index);
        } elseif ($node instanceof \DOMAttr) {
            return $this->getAttributeHandler($node, $this, $index);
        } elseif ($node instanceof \DOMNameSpaceNode) {
            return new NameSpaceHandler($node, $this, $index);
        }
        return $this->getNodeHandler($node, $this, $index);
    }
public function getHandler($node, $index = -1)
    {
        if ($node instanceof \DOMElement) {
            return $this->getElementHandler($node, $this, $index);
        } elseif ($node instanceof \DOMAttr) {
            return $this->getAttributeHandler($node, $this, $index);
        } elseif ($node instanceof \DOMNameSpaceNode) {
            return new NameSpaceHandler($node, $this, $index);
        }
        return $this->getNodeHandler($node, $this, $index);
    }
public function getHandler ( $ node , $ index = - 1 ) { if ( $ node instanceof \ DOMElement ) { return $ this -> getElementHandler ( $ node , $ this , $ index ) ; } elseif ( $ node instanceof \ DOMAttr ) { return $ this -> getAttributeHandler ( $ node , $ this , $ index ) ; } elseif ( $ node instanceof \ DOMNameSpaceNode ) { return new NameSpaceHandler ( $ node , $ this , $ index ) ; } return $ this -> getNodeHandler ( $ node , $ this , $ index ) ; }
Return the matching node handler based on current \DomNode type
@param \DOMNode|\DOMNameSpaceNode $node
@param int $index
@return NodeHandler|ElementHandler|AttributeHandler|NameSpaceHandler
Return the matching node handler based on current \ DomNode type