Neos.ContentRepository/Classes/Domain/Service/Context.php
public function getNode($path)
    {
        if (!is_string($path) || $path[0] !== '/') {
            throw new \InvalidArgumentException('Only absolute paths are allowed for Context::getNode()', 1284975105);
        }

        $path = strtolower($path);

        $workspaceRootNode = $this->getWorkspace()->getRootNodeData();
        $rootNode = $this->nodeFactory->createFromNodeData($workspaceRootNode, $this);
        if ($path !== '/') {
            $node = $this->firstLevelNodeCache->getByPath($path);
            if ($node === false) {
                $node = $rootNode->getNode(substr($path, 1));
                $this->firstLevelNodeCache->setByPath($path, $node);
            }
        } else {
            $node = $rootNode;
        }

        return $node;
    }
public function getNode($path)
    {
        if (!is_string($path) || $path[0] !== '/') {
            throw new \InvalidArgumentException('Only absolute paths are allowed for Context::getNode()', 1284975105);
        }

        $path = strtolower($path);

        $workspaceRootNode = $this->getWorkspace()->getRootNodeData();
        $rootNode = $this->nodeFactory->createFromNodeData($workspaceRootNode, $this);
        if ($path !== '/') {
            $node = $this->firstLevelNodeCache->getByPath($path);
            if ($node === false) {
                $node = $rootNode->getNode(substr($path, 1));
                $this->firstLevelNodeCache->setByPath($path, $node);
            }
        } else {
            $node = $rootNode;
        }

        return $node;
    }
public function getNode ( $ path ) { if ( ! is_string ( $ path ) || $ path [ 0 ] !== '/' ) { throw new \ InvalidArgumentException ( 'Only absolute paths are allowed for Context::getNode()' , 1284975105 ) ; } $ path = strtolower ( $ path ) ; $ workspaceRootNode = $ this -> getWorkspace ( ) -> getRootNodeData ( ) ; $ rootNode = $ this -> nodeFactory -> createFromNodeData ( $ workspaceRootNode , $ this ) ; if ( $ path !== '/' ) { $ node = $ this -> firstLevelNodeCache -> getByPath ( $ path ) ; if ( $ node === false ) { $ node = $ rootNode -> getNode ( substr ( $ path , 1 ) ) ; $ this -> firstLevelNodeCache -> setByPath ( $ path , $ node ) ; } } else { $ node = $ rootNode ; } return $ node ; }
Returns a node specified by the given absolute path.

@param string $path Absolute path specifying the node
@return NodeInterface The specified node or NULL if no such node exists
@throws \InvalidArgumentException
@api
Returns a node specified by the given absolute path .