Neos.Fusion/Classes/FusionObjects/ResourceUriImplementation.php
public function evaluate()
    {
        $resource = $this->getResource();
        if ($resource !== null) {
            $uri = false;
            if ($resource instanceof PersistentResource) {
                $uri = $this->resourceManager->getPublicPersistentResourceUri($resource);
            }
            if ($uri === false) {
                throw new FusionException('The specified resource is invalid', 1386458728);
            }
            return $uri;
        }
        $path = $this->getPath();
        if ($path === null) {
            throw new FusionException('Neither "resource" nor "path" were specified', 1386458763);
        }
        if (strpos($path, 'resource://') === 0) {
            $matches = [];
            if (preg_match('#^resource://([^/]+)/Public/(.*)#', $path, $matches) !== 1) {
                throw new FusionException(sprintf('The specified path "%s" does not point to a public resource.', $path), 1386458851);
            }
            $package = $matches[1];
            $path = $matches[2];
        } else {
            $package = $this->getPackage();
            if ($package === null) {
                $controllerContext = $this->runtime->getControllerContext();
                /** @var $actionRequest ActionRequest */
                $actionRequest = $controllerContext->getRequest();
                $package = $actionRequest->getControllerPackageKey();
            }
        }
        $localize = $this->isLocalize();
        if ($localize === true) {
            $resourcePath = 'resource://' . $package . '/Public/' . $path;
            $localizedResourcePathData = $this->i18nService->getLocalizedFilename($resourcePath);
            $matches = [];
            if (preg_match('#resource://([^/]+)/Public/(.*)#', current($localizedResourcePathData), $matches) === 1) {
                $package = $matches[1];
                $path = $matches[2];
            }
        }

        return $this->resourceManager->getPublicPackageResourceUri($package, $path);
    }
public function evaluate()
    {
        $resource = $this->getResource();
        if ($resource !== null) {
            $uri = false;
            if ($resource instanceof PersistentResource) {
                $uri = $this->resourceManager->getPublicPersistentResourceUri($resource);
            }
            if ($uri === false) {
                throw new FusionException('The specified resource is invalid', 1386458728);
            }
            return $uri;
        }
        $path = $this->getPath();
        if ($path === null) {
            throw new FusionException('Neither "resource" nor "path" were specified', 1386458763);
        }
        if (strpos($path, 'resource://') === 0) {
            $matches = [];
            if (preg_match('#^resource://([^/]+)/Public/(.*)#', $path, $matches) !== 1) {
                throw new FusionException(sprintf('The specified path "%s" does not point to a public resource.', $path), 1386458851);
            }
            $package = $matches[1];
            $path = $matches[2];
        } else {
            $package = $this->getPackage();
            if ($package === null) {
                $controllerContext = $this->runtime->getControllerContext();
                /** @var $actionRequest ActionRequest */
                $actionRequest = $controllerContext->getRequest();
                $package = $actionRequest->getControllerPackageKey();
            }
        }
        $localize = $this->isLocalize();
        if ($localize === true) {
            $resourcePath = 'resource://' . $package . '/Public/' . $path;
            $localizedResourcePathData = $this->i18nService->getLocalizedFilename($resourcePath);
            $matches = [];
            if (preg_match('#resource://([^/]+)/Public/(.*)#', current($localizedResourcePathData), $matches) === 1) {
                $package = $matches[1];
                $path = $matches[2];
            }
        }

        return $this->resourceManager->getPublicPackageResourceUri($package, $path);
    }
public function evaluate ( ) { $ resource = $ this -> getResource ( ) ; if ( $ resource !== null ) { $ uri = false ; if ( $ resource instanceof PersistentResource ) { $ uri = $ this -> resourceManager -> getPublicPersistentResourceUri ( $ resource ) ; } if ( $ uri === false ) { throw new FusionException ( 'The specified resource is invalid' , 1386458728 ) ; } return $ uri ; } $ path = $ this -> getPath ( ) ; if ( $ path === null ) { throw new FusionException ( 'Neither "resource" nor "path" were specified' , 1386458763 ) ; } if ( strpos ( $ path , 'resource://' ) === 0 ) { $ matches = [ ] ; if ( preg_match ( '#^resource://([^/]+)/Public/(.*)#' , $ path , $ matches ) !== 1 ) { throw new FusionException ( sprintf ( 'The specified path "%s" does not point to a public resource.' , $ path ) , 1386458851 ) ; } $ package = $ matches [ 1 ] ; $ path = $ matches [ 2 ] ; } else { $ package = $ this -> getPackage ( ) ; if ( $ package === null ) { $ controllerContext = $ this -> runtime -> getControllerContext ( ) ; /** @var $actionRequest ActionRequest */ $ actionRequest = $ controllerContext -> getRequest ( ) ; $ package = $ actionRequest -> getControllerPackageKey ( ) ; } } $ localize = $ this -> isLocalize ( ) ; if ( $ localize === true ) { $ resourcePath = 'resource://' . $ package . '/Public/' . $ path ; $ localizedResourcePathData = $ this -> i18nService -> getLocalizedFilename ( $ resourcePath ) ; $ matches = [ ] ; if ( preg_match ( '#resource://([^/]+)/Public/(.*)#' , current ( $ localizedResourcePathData ) , $ matches ) === 1 ) { $ package = $ matches [ 1 ] ; $ path = $ matches [ 2 ] ; } } return $ this -> resourceManager -> getPublicPackageResourceUri ( $ package , $ path ) ; }
Returns the absolute URL of a resource

@return string
@throws FusionException
Returns the absolute URL of a resource