Gets the uri to access the site.

@return string

@throws \RuntimeException
Thrown when the nginx container is not available.
769285
public static function getUri() {
        $nginx_port = Docker::getContainerPort(Compose::getContainerName(self::projectName(), 'nginx'), 80);
        if (!$nginx_port) {
            throw new \RuntimeException("nginx container is not running");
        }
        return "http://localhost:$nginx_port";
    }
782287
public function uri()
    {
        $uri = (!empty($this->url['scheme']) ? $this->url['scheme'] . '://' : Server::getInstance()->get('scheme', ''));
        $uri .= (!empty($this->url['user']) ? $this->url['user'] . ':' . $this->url['pass'] . '@' : '');
        $uri .= (!empty($this->url['host']) ? $this->url['host'] : Server::getInstance()->get('host', ''));
        $uri .= (!empty($this->url['port']) ? ':' . $this->url['port'] : '');
        $uri .= (!empty($this->url['path']) ? $this->url['path'] : '');
        $uri .= (!empty($this->url['query']) ? '?' . $this->url['query'] : '');
        $uri .= (!empty($this->url['fragment']) ? '#' . $this->url['fragment'] : '');

        return $uri;
    }
71022
public function getUri()
    {
        $userPart = '';
        if ($this->getUser() !== null && $this->getPass() !== null) {
            $userPart = $this->getUser() . ':' . $this->getPass()  . '@';
        } else if ($this->getUser() !== null) {
            $userPart = $this->getUser() . '@';
        }
        $schemePart = ($this->getScheme() ? $this->getScheme() . '://' : '//');
        if (!in_array($this->getScheme(), self::getSchemesWithAuthority())) {
            $schemePart = $this->getScheme() . ':';
        }
        $portPart = ($this->getPort() ? ':' . $this->getPort() : '');
        $queryPart = ($this->getQuery() ? '?' . $this->getQuery() : '');
        $fragmentPart = ($this->getFragment() ? '#' . $this->getFragment() : '');
        if ($this->isRelative()) {
            return $this->getPath() .
            $queryPart .
            $fragmentPart;
        }
        $path = $this->getPath();
        if (0 !== strlen($path) && '/' !== $path[0]) {
            $path = '/' . $path;
        }
        return $schemePart .
        $userPart .
        $this->getHost() .
        $portPart .
        $path .
        $queryPart .
        $fragmentPart;
    }
800252
protected function _getHostFromUri()
    {
        $host  = $this->uri->getHost();
        $host .= $this->uri->getPort() ? ':' . $this->uri->getPort() : '';
        return $host;
    }
77520
public static function getURI()
    {
        $s = $_SERVER;
        $ssl = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on');
        $sp = strtolower(array_get($s, 'SERVER_PROTOCOL', 'http://'));
        $protocol = substr($sp, 0, strpos($sp, '/')) . (($ssl) ? 's' : '');
        $port = array_get($s, 'SERVER_PORT', '80');
        $port = ((!$ssl && $port == '80') || ($ssl && $port == '443')) ? '' : ':' . $port;
        $host = (isset($s['HTTP_HOST']) ? $s['HTTP_HOST'] : array_get($s, 'SERVER_NAME', 'localhost'));
        $host = (strpos($host, ':') !== false) ? $host : $host . $port;

        return $protocol . '://' . $host;
    }
979115
public function uri() {
		$uri = self::uriTrim();
		$webRoot = self::webRoot();
		$uri = str_replace($webRoot, '', $uri);
		$uri = trim($uri, '/');
		return $uri;
	}
276295
public function getSiteUrl()
    {
        $url = clone $this->getBaseUrl();

        if(JFactory::getApplication()->getName() == 'administrator')
        {
            // Replace the application name only once since it's possible that
            // we can run from http://localhost/administrator/administrator
            $i    = 1;
            $path = str_ireplace('/administrator', '', $url->getPath(), $i);
            $url->setPath($path);
        }

        return $url;
    }
943003
public function getBaseUri()
    {
        if ('' !== $qs = $this->getQueryString()) {
            $qs = '?' . $qs;
        }

        return $this->getSchemeAndHost() . $this->getRequestUri() . $qs;
    }
545730
public function getGatewayUrl()
    {
        switch ($this->getGatewayMode())
        {
            case self::GATEWAY_MODE_SANDBOX:
            {
                return $this->getGatewayUrlSandbox();
            }
            case self::GATEWAY_MODE_PRODUCTION:
            {
                return $this->getGatewayUrlProduction();
            }
            default:
            {
                throw new RuntimeException('You must set gatewayMode property first');
            }
        }
    }
947314
public function getUri()
    {
        if (!$this->uri)
            $this->uri = new Uri($this->httpMessage->getTarget());
        
        return $this->uri;
    }
28065
public function getBaseUri()
    {
        $controller = $this;
        return preg_replace_callback('/:(\w+)/', function ($matches) use ($controller) {
            return $controller->routeData($matches[1]);
        }, $this->baseUri);
    }
1103224
private function getUri(): UriInterface
    {
        $uri = $this->getNewUri();

        if (!empty($this->apiUrl['scheme'])) {
            $uri = $uri->withScheme($this->apiUrl['scheme']);
        }

        if (!empty($this->apiUrl['host'])) {
            $uri = $uri->withHost($this->apiUrl['host']);
        }

        if (!empty($this->apiUrl['port'])) {
            $uri = $uri->withPort($this->apiUrl['port']);
        }

        if (!empty($this->apiUrl['path'])) {
            $uri = $uri->withPath($this->apiUrl['path']);
        }

        if (!empty($this->apiUrl['query'])) {
            $uri = $uri->withQuery($this->apiUrl['query']);
        }

        if (!empty($this->apiUrl['fragment'])) {
            $uri = $uri->withFragment($this->apiUrl['fragment']);
        }

        return $uri;
    }
457708
protected static function getRequestUrl()
    {
        $hostname = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : null);

        if(isset($hostname))
        {
            $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';

            if(!isset($_SERVER['REQUEST_URI']))
            {
                if(isset($_SERVER['QUERY_STRING']))
                {
                    return $protocol . '://' . $hostname . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
                }
                else
                {
                    return $protocol . '://' . $hostname . $_SERVER['PHP_SELF'];
                }
            }
            else
            {
                return $protocol . '://' . $hostname . $_SERVER['REQUEST_URI'];
            }
        }
        else
        {
            return null;
        }
    }
1118854
public function getUri()
    {
        if ( empty( $this->_uriCache ) )
        {
            $subdomainId = $this->getSubdomainId();
            $info = $this->getServiceLocator()
                         ->get( 'Zork\Db\SiteInfo' );

            if ( empty( $subdomainId ) )
            {
                $subdomainId = $info->getSubdomainId();
            }
            else if ( $subdomainId != $info->getSubdomainId() )
            {
                $subdomain = $this->getSubDomainModel()
                                  ->find( $subdomainId );

                if ( empty( $subdomain ) )
                {
                    $subdomainId = $info->getSubdomainId();
                }
            }

            if ( ! empty( $this->contentId ) )
            {
                $base   = '/';
                $locale = $this->getMapper()
                               ->getLocale();
                $uri    = $this->getUriModel()
                               ->findDefaultByContentSubdomain(
                                    $this->getContentId(),
                                    $subdomainId,
                                    $locale
                                );

                if ( ! empty( $subdomain ) )
                {
                    $base = $info->getSubdomainUrl(
                        (string) $subdomain->subdomain,
                        $base
                    );
                }

                if ( empty( $uri ) )
                {
                    $uri = $base . 'app/' . $locale .
                           '/paragraph/render/' . $this->getContentId();
                }
                else
                {
                    $uri = $base . ltrim( $uri->safeUri, '/' );
                    $this->_uriCache = $uri;
                }

                return $uri;
            }
        }

        return $this->_uriCache;
    }
15486
public function getUrl()
    {
        if (!userHasPermission('admin:cdn:manager:object:browse')) {
            $oHttpCodes = Factory::service('HttpCodes');
            throw new ApiException(
                'You do not have permission to access this resource',
                $oHttpCodes::STATUS_UNAUTHORIZED
            );
        }

        $oInput = Factory::service('Input');

        return Factory::factory('ApiResponse', 'nails/module-api')
            ->setData(site_url(
                'admin/cdn/manager?' .
                http_build_query([
                    'bucket'   => $oInput->get('bucket'),
                    'callback' => $oInput->get('callback'),
                ])
            ));
    }
1229401
public function getUri()
    {
        $uri = parent::getUri();

        if (!\in_array($this->getMethod(), ['POST', 'PUT', 'DELETE', 'PATCH'])) {
            $query = parse_url($uri, PHP_URL_QUERY);
            $currentParameters = [];
            if ($query) {
                parse_str($query, $currentParameters);
            }

            $queryString = http_build_query(array_merge($currentParameters, $this->getValues()), '', '&');

            $pos = strpos($uri, '?');
            $base = false === $pos ? $uri : substr($uri, 0, $pos);
            $uri = rtrim($base.'?'.$queryString, '?');
        }

        return $uri;
    }
407557
public function getUri()
    {
        if ( $this->hasChildren() )
        {
            foreach( $this->getChildren() as $child )
            {
                $uri = $child->getUri();

                if ( '#' != $uri[0] )
                {
                    return $uri;
                }
            }
        }
        else
        {
            return '#';
        }
    }