Retrieves the URI instance.

This method MUST return a UriInterface instance.

@link http://tools.ietf.org/html/rfc3986#section-4.3
@return UriInterface Returns a UriInterface instance
representing the URI of the request.
969123
public function getUri()
    {
        if ($this->uri === null) {
            if ($this->uriProvider !== null) {
                $this->uri = ($this->uriProvider)();
            } else {
                $this->uri = new Uri();
            }
        }
        return $this->uri;
    }
1152901
public function getSkinId(): \Psr\Http\Message\UriInterface
    {
        if (!$this->skinId) {
            return new Uri();
        }

        return $this->skinId;
    }
1361801
protected function getCurrentURI()
	{
		$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
		$current_uri = $protocol.$_SERVER['HTTP_HOST'].$this->getRequestURI();
		$parts = parse_url($current_uri);

		$query = '';
		if(!empty($parts['query']))
		{
			$params = array();
			parse_str($parts['query'], $params);
			$params = array_filter($params);
			if(!empty($params))
			{
				$query = '?'.http_build_query($params, '', '&');
			}
		}

		// Use port if non default.
		$port = isset($parts['port']) &&
			(($protocol === 'http://' && $parts['port'] !== 80) || ($protocol === 'https://' && $parts['port'] !== 443)) ? ':'.$parts['port']
				: '';

		// Rebuild.
		return $protocol.$parts['host'].$port.$parts['path'].$query;
	}
601448
public function getCurrentUri() : string
    {
        $basePath = $this->getBaseUrl();
        $uri = $this->currentUrl;

        $this->base = $basePath;
        $uri = substr($uri, strlen($basePath));

        // Don't take query params into account on the URL
        if (strstr($uri, '?')) {
            $uri = substr($uri, 0, strpos($uri, '?'));
        }

        // Remove trailing slash + enforce a slash at the start
        $uri = '/'.trim($uri, '/');

        return $uri;
    }
797316
public function createUriFromGlobal(): UriInterface{
        return $this->createUri(
            $this->resolveScheme()
            . "://"
            . $this->resolveAuthority()
            . $this->resolvePathAndQuery()
        );
    }
130350
public URI baseIngestionURL() {
        StringBuilder b = new StringBuilder()
                .append(protocol())
                .append(ingestionHost())
                .append(":")
                .append(port())
                .append("/");
        try {
            return new URI(b.toString());
        } catch (URISyntaxException e) {
            throw new IllegalArgumentException("Unable to construct a base URL for the ingestion API", e);
        }
    }
460889
public function getRequestUri() {

		if (NULL === $this->requestUri) {
			$this->requestUri = $this->prepareRequestUri();
		}

		return $this->requestUri;

	}
1058234
@Override
    public String reconstructURI()
    {
        // If this instance is immutable, then lazy-cache reconstructing the uri.
        if (immutable) {
            if (reconstructedUri == null) {
                reconstructedUri = _reconstructURI();
            }
            return reconstructedUri;
        }
        else {
            return _reconstructURI();
        }
    }
255383
public function getUri()
    {
        $schema = "http";

        if ($this->isSecure) {
            $schema = "https";
        }
        
        $uri = sprintf(
            "%s://%s%s",
            $schema,
            $this->serverName,
            $this->path
        );
        
        return new Uri($uri);
    }
888872
public static String getCurrentUri() {
    HttpServletRequest request =
        ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();

    StringBuilder uri = new StringBuilder();
    uri.append(request.getAttribute("javax.servlet.forward.request_uri"));

    if (StringUtils.isNotBlank(request.getQueryString())) {
      uri.append("?").append(request.getQueryString());
    }

    return uri.toString();
  }
462578
public function get_base_uri()
	{
		if($this->base_uri != null)
			return $this->base_uri;

		return htmlentities(dirname($_SERVER['PHP_SELF']), ENT_QUOTES | ENT_IGNORE, "UTF-8") . '/';
	}
734036
public static function getUri() {
        if (self::$_uri === null) {
            $uri = explode('?', $_SERVER['REQUEST_URI'], 2)[0];
            self::$_uri = self::fixUri(substr($uri, strlen(BASE_URI)));
        }
        return self::$_uri;
    }
424446
public String getUri() {
        final Object requestUri = getHeader(HttpMessageHeaders.HTTP_REQUEST_URI);

        if (requestUri != null) {
            return requestUri.toString();
        }

        return null;
    }
467757
public function getSafeUri()
    {
        static $safe = array(
            '%2F' => '/',
            '%2f' => '/',
        );

        if ( empty( $this->uri ) )
        {
            return null;
        }

        return strtr( rawurlencode( $this->uri ), $safe );
    }
109091
public function resolve(UriInterface $uri): UriInterface
    {
        $request = new Request('GET', $uri);
        $lastRequestUri = $request->getUri();
        $requestUri = new Uri('');

        try {
            $response = $this->httpClient->send($request, [
                'on_stats' => function (TransferStats $stats) use (&$requestUri) {
                    if ($stats->hasResponse()) {
                        $requestUri = $stats->getEffectiveUri();
                    }
                },
            ]);
        } catch (TooManyRedirectsException $tooManyRedirectsException) {
            return $requestUri;
        } catch (BadResponseException $badResponseException) {
            $response = $badResponseException->getResponse();
        }

        if ($this->followMetaRedirects) {
            $metaRedirectUri = $this->getMetaRedirectUriFromResponse($response, $lastRequestUri);

            if (!empty($metaRedirectUri) && !$this->isLastResponseUrl($metaRedirectUri, $lastRequestUri)) {
                return $this->resolve($metaRedirectUri);
            }
        }

        return $requestUri;
    }
668852
public StringBuffer getRequestURL()
    {
        StringBuffer buf = _httpRequest.getRootURL();
        buf.append(getRequestURI());
        return buf;
    }
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;
    }