src/Sulu/Component/Webspace/Manager/WebspaceManager.php
private function createResourceLocatorUrl($scheme, $portalUrl, $resourceLocator)
    {
        if (false !== strpos($portalUrl, '/')) {
            // trim slash when resourceLocator is not domain root
            $resourceLocator = rtrim($resourceLocator, '/');
        }

        return rtrim(sprintf('%s://%s', $scheme, $portalUrl), '/') . $resourceLocator;
    }
private function createResourceLocatorUrl($scheme, $portalUrl, $resourceLocator)
    {
        if (false !== strpos($portalUrl, '/')) {
            // trim slash when resourceLocator is not domain root
            $resourceLocator = rtrim($resourceLocator, '/');
        }

        return rtrim(sprintf('%s://%s', $scheme, $portalUrl), '/') . $resourceLocator;
    }
private function createResourceLocatorUrl ( $ scheme , $ portalUrl , $ resourceLocator ) { if ( false !== strpos ( $ portalUrl , '/' ) ) { // trim slash when resourceLocator is not domain root $ resourceLocator = rtrim ( $ resourceLocator , '/' ) ; } return rtrim ( sprintf ( '%s://%s' , $ scheme , $ portalUrl ) , '/' ) . $ resourceLocator ; }
Return a valid resource locator url.

@param string $scheme
@param string $portalUrl
@param string $resourceLocator

@return string
Return a valid resource locator url .