Neos\Flow\ResourceManagement\Target\FileSystemTarget::detectResourcesBaseUri PHP Method

detectResourcesBaseUri() protected method

Detects and returns the website's absolute base URI
protected detectResourcesBaseUri ( ) : string
return string The resolved resource base URI, @see getResourcesBaseUri()
    protected function detectResourcesBaseUri()
    {
        if ($this->baseUri !== '' && ($this->baseUri[0] === '/' || strpos($this->baseUri, '://') !== false)) {
            return $this->baseUri;
        }
        $requestHandler = $this->bootstrap->getActiveRequestHandler();
        if ($requestHandler instanceof HttpRequestHandlerInterface) {
            return $requestHandler->getHttpRequest()->getBaseUri() . $this->baseUri;
        }
        if ($this->httpBaseUri === null) {
            throw new TargetException(sprintf('The base URI for resources could not be detected. Please specify the "Neos.Flow.http.baseUri" setting or use an absolute "baseUri" option for target "%s".', $this->name), 1438093977);
        }
        return $this->httpBaseUri . $this->baseUri;
    }