public function getNode(NodePath $nodePath, array $data = null)
    {
        if (empty($data)) {
            $data = $this->data;
        }
        $nodePath = $nodePath->popFirst($nodeName);
        $nodeName = $this->encodeNodeName($nodeName);
        if (!isset($data[$nodeName])) {
            return null;
        }
        if ($nodePath->isEmpty()) {
            return $data[$nodeName];
        } else {
            return $this->getNode($nodePath, $data[$nodeName]);
        }
    }
public function getNode(NodePath $nodePath, array $data = null)
    {
        if (empty($data)) {
            $data = $this->data;
        }
        $nodePath = $nodePath->popFirst($nodeName);
        $nodeName = $this->encodeNodeName($nodeName);
        if (!isset($data[$nodeName])) {
            return null;
        }
        if ($nodePath->isEmpty()) {
            return $data[$nodeName];
        } else {
            return $this->getNode($nodePath, $data[$nodeName]);
        }
    }
public function getNode ( NodePath $ nodePath , array $ data = null ) { if ( empty ( $ data ) ) { $ data = $ this -> data ; } $ nodePath = $ nodePath -> popFirst ( $ nodeName ) ; $ nodeName = $ this -> encodeNodeName ( $ nodeName ) ; if ( ! isset ( $ data [ $ nodeName ] ) ) { return null ; } if ( $ nodePath -> isEmpty ( ) ) { return $ data [ $ nodeName ] ; } else { return $ this -> getNode ( $ nodePath , $ data [ $ nodeName ] ) ; } }
Get structure of a particular node.
@param NodePath $nodePath Node path.
@param array $data Optional structure data (for recursive call).
@return array|null Null in case the node path does not exist.
Get structure of a particular node .