Neos.Neos/Classes/Service/LinkingService.php
public function convertUriToObject($uri, NodeInterface $contextNode = null)
    {
        if ($uri instanceof Uri) {
            $uri = (string)$uri;
        }

        if (preg_match(self::PATTERN_SUPPORTED_URIS, $uri, $matches) === 1) {
            switch ($matches[1]) {
                case 'node':
                    if ($contextNode === null) {
                        throw new \RuntimeException('node:// URI conversion requires a context node to be passed', 1409734235);
                    };

                    return $contextNode->getContext()->getNodeByIdentifier($matches[2]);
                case 'asset':
                    return $this->assetRepository->findByIdentifier($matches[2]);
            }
        }

        return null;
    }
public function convertUriToObject($uri, NodeInterface $contextNode = null)
    {
        if ($uri instanceof Uri) {
            $uri = (string)$uri;
        }

        if (preg_match(self::PATTERN_SUPPORTED_URIS, $uri, $matches) === 1) {
            switch ($matches[1]) {
                case 'node':
                    if ($contextNode === null) {
                        throw new \RuntimeException('node:// URI conversion requires a context node to be passed', 1409734235);
                    };

                    return $contextNode->getContext()->getNodeByIdentifier($matches[2]);
                case 'asset':
                    return $this->assetRepository->findByIdentifier($matches[2]);
            }
        }

        return null;
    }
public function convertUriToObject ( $ uri , NodeInterface $ contextNode = null ) { if ( $ uri instanceof Uri ) { $ uri = ( string ) $ uri ; } if ( preg_match ( self :: PATTERN_SUPPORTED_URIS , $ uri , $ matches ) === 1 ) { switch ( $ matches [ 1 ] ) { case 'node' : if ( $ contextNode === null ) { throw new \ RuntimeException ( 'node:// URI conversion requires a context node to be passed' , 1409734235 ) ; } ; return $ contextNode -> getContext ( ) -> getNodeByIdentifier ( $ matches [ 2 ] ) ; case 'asset' : return $ this -> assetRepository -> findByIdentifier ( $ matches [ 2 ] ) ; } } return null ; }
Return the object the URI addresses or NULL.

@param string|Uri $uri
@param NodeInterface $contextNode
@return NodeInterface|AssetInterface|NULL
Return the object the URI addresses or NULL .