public function getNodeForPath($path)
    {
        $path = trim($path, '/');
        if (isset($this->cache[$path])) {
            return $this->cache[$path];
        }

        // Is it the root node?
        if (!strlen($path)) {
            return $this->rootNode;
        }

        // Attempting to fetch its parent
        list($parentName, $baseName) = Uri\split($path);

        // If there was no parent, we must simply ask it from the root node.
        if ('' === $parentName) {
            $node = $this->rootNode->getChild($baseName);
        } else {
            // Otherwise, we recursively grab the parent and ask him/her.
            $parent = $this->getNodeForPath($parentName);

            if (!($parent instanceof ICollection)) {
                throw new Exception\NotFound('Could not find node at path: '.$path);
            }
            $node = $parent->getChild($baseName);
        }

        $this->cache[$path] = $node;

        return $node;
    }
public function getNodeForPath($path)
    {
        $path = trim($path, '/');
        if (isset($this->cache[$path])) {
            return $this->cache[$path];
        }

        // Is it the root node?
        if (!strlen($path)) {
            return $this->rootNode;
        }

        // Attempting to fetch its parent
        list($parentName, $baseName) = Uri\split($path);

        // If there was no parent, we must simply ask it from the root node.
        if ('' === $parentName) {
            $node = $this->rootNode->getChild($baseName);
        } else {
            // Otherwise, we recursively grab the parent and ask him/her.
            $parent = $this->getNodeForPath($parentName);

            if (!($parent instanceof ICollection)) {
                throw new Exception\NotFound('Could not find node at path: '.$path);
            }
            $node = $parent->getChild($baseName);
        }

        $this->cache[$path] = $node;

        return $node;
    }
public function getNodeForPath ( $ path ) { $ path = trim ( $ path , '/' ) ; if ( isset ( $ this -> cache [ $ path ] ) ) { return $ this -> cache [ $ path ] ; } // Is it the root node? if ( ! strlen ( $ path ) ) { return $ this -> rootNode ; } // Attempting to fetch its parent list ( $ parentName , $ baseName ) = Uri \ split ( $ path ) ; // If there was no parent, we must simply ask it from the root node. if ( '' === $ parentName ) { $ node = $ this -> rootNode -> getChild ( $ baseName ) ; } else { // Otherwise, we recursively grab the parent and ask him/her. $ parent = $ this -> getNodeForPath ( $ parentName ) ; if ( ! ( $ parent instanceof ICollection ) ) { throw new Exception \ NotFound ( 'Could not find node at path: ' . $ path ) ; } $ node = $ parent -> getChild ( $ baseName ) ; } $ this -> cache [ $ path ] = $ node ; return $ node ; }
Returns the INode object for the requested path.

@param string $path

@return INode
Returns the INode object for the requested path .