public function getNodeById($id, $recursively = false) {
        $found = null;
        if (true === array_key_exists($id, $this->index)) {
            $found = $this->getNodeAt($this->index[$id]);
        }
        if (null === $found && true === $recursively) {
            foreach ($this->nodes as $current) {
                $found = $current->getNodeById($id, $recursively);
                if (null !== $found) {
                    break;
                }
            }
        }
        return $found;
    }
public function getNodeById($id, $recursively = false) {
        $found = null;
        if (true === array_key_exists($id, $this->index)) {
            $found = $this->getNodeAt($this->index[$id]);
        }
        if (null === $found && true === $recursively) {
            foreach ($this->nodes as $current) {
                $found = $current->getNodeById($id, $recursively);
                if (null !== $found) {
                    break;
                }
            }
        }
        return $found;
    }
public function getNodeById ( $ id , $ recursively = false ) { $ found = null ; if ( true === array_key_exists ( $ id , $ this -> index ) ) { $ found = $ this -> getNodeAt ( $ this -> index [ $ id ] ) ; } if ( null === $ found && true === $ recursively ) { foreach ( $ this -> nodes as $ current ) { $ found = $ current -> getNodeById ( $ id , $ recursively ) ; if ( null !== $ found ) { break ; } } } return $ found ; }
Get a node by id.

@param string $id The id.
@param bool $recursively Recursively ?
@return AbstractNode Returns a node in case of success, null otherwise.
Get a node by id .