public function dispatch(AbstractNode $node)
    {
        $methodName = sprintf('walk%s', $node->getName());

        if (!method_exists($this, $methodName)) {
            throw new InvalidArgumentException(sprintf(
                'Do not know how to walk node of type "%s"',
                $node->getName()
            ));
        }

        return $this->$methodName($node);
    }
public function dispatch(AbstractNode $node)
    {
        $methodName = sprintf('walk%s', $node->getName());

        if (!method_exists($this, $methodName)) {
            throw new InvalidArgumentException(sprintf(
                'Do not know how to walk node of type "%s"',
                $node->getName()
            ));
        }

        return $this->$methodName($node);
    }
public function dispatch ( AbstractNode $ node ) { $ methodName = sprintf ( 'walk%s' , $ node -> getName ( ) ) ; if ( ! method_exists ( $ this , $ methodName ) ) { throw new InvalidArgumentException ( sprintf ( 'Do not know how to walk node of type "%s"' , $ node -> getName ( ) ) ) ; } return $ this -> $ methodName ( $ node ) ; }
Dispatch a node.

This method will look for a method of the form
"walk{NodeType}" in this class and then use that
to build the PHPCR QOM counterpart of the given node.

@param AbstractNode $node

@return object - PHPCR QOM object
Dispatch a node .