Contao\CoreBundle\Routing\UrlGenerator::addHostToContext PHP Method

addHostToContext() private method

Sets the context from the domain.
private addHostToContext ( Symfony\Component\Routing\RequestContext $context, array $parameters, string &$referenceType )
$context Symfony\Component\Routing\RequestContext
$parameters array
$referenceType string
    private function addHostToContext(RequestContext $context, array $parameters, &$referenceType)
    {
        list($host, $port) = $this->getHostAndPort($parameters['_domain']);
        if ($context->getHost() === $host) {
            return;
        }
        $context->setHost($host);
        $referenceType = UrlGeneratorInterface::ABSOLUTE_URL;
        if (!$port) {
            return;
        }
        if (isset($parameters['_ssl']) && true === $parameters['_ssl']) {
            $context->setHttpsPort($port);
        } else {
            $context->setHttpPort($port);
        }
    }