private function getUriForSite($pathinfo, Site $site = null)
    {
        $siteUsed = $this->getCurrentSite($site);
        if (null === $siteUsed || null === $this->application) {
            return $pathinfo;
        }

        $protocol = '';
        if (null === parse_url($siteUsed->getServerName(), PHP_URL_SCHEME)) {
            $protocol = (string) $this->defaultScheme;
            $protocol = $protocol . ($protocol ? ':' : '') . '//';
        }

        return $protocol . $siteUsed->getServerName() . $pathinfo;
    }
private function getUriForSite($pathinfo, Site $site = null)
    {
        $siteUsed = $this->getCurrentSite($site);
        if (null === $siteUsed || null === $this->application) {
            return $pathinfo;
        }

        $protocol = '';
        if (null === parse_url($siteUsed->getServerName(), PHP_URL_SCHEME)) {
            $protocol = (string) $this->defaultScheme;
            $protocol = $protocol . ($protocol ? ':' : '') . '//';
        }

        return $protocol . $siteUsed->getServerName() . $pathinfo;
    }
private function getUriForSite ( $ pathinfo , Site $ site = null ) { $ siteUsed = $ this -> getCurrentSite ( $ site ) ; if ( null === $ siteUsed || null === $ this -> application ) { return $ pathinfo ; } $ protocol = '' ; if ( null === parse_url ( $ siteUsed -> getServerName ( ) , PHP_URL_SCHEME ) ) { $ protocol = ( string ) $ this -> defaultScheme ; $ protocol = $ protocol . ( $ protocol ? ':' : '' ) . '//' ; } return $ protocol . $ siteUsed -> getServerName ( ) . $ pathinfo ; }
Returns URI from pathinfo according to site to be reached.

@param  string    $pathinfo The pathinfo to treate.
@param  Site|null $site     Optional, the site to care of, if null get the current site.

@return string               The computed URI.
Returns URI from pathinfo according to site to be reached .