Jackalope\ObjectManager::getNode PHP Method

getNode() public method

If you have an absolute path use {@link getNodeByPath()} for better performance.
See also: Session::getNode()
public getNode ( string $relPath, string $context, string $class = 'Node' ) : PHPCR\NodeInterface
$relPath string relative path
$context string context path
$class string optional class name for the factory
return PHPCR\NodeInterface The specified Node. if not available, ItemNotFoundException is thrown
    public function getNode($relPath, $context, $class = 'Node')
    {
        $path = PathHelper::absolutizePath($relPath, $context);
        return $this->getNodeByPath($path, $class);
    }

Usage Example

Exemplo n.º 1
0
 public function current()
 {
     $path = $this->key();
     if (!isset($path)) {
         return null;
     }
     return $this->objectmanager->getNode($path);
 }
All Usage Examples Of Jackalope\ObjectManager::getNode