Get the URI for the current request.

@return string
543779
public static function current()
        {
            if ( ! is_null(static::$uri)) {
                return static::$uri;
            }

            // We'll simply get the path info from the Symfony Request instance and then
            // format to meet our needs in the router. If the URI is root, we'll give
            // back a single slash, otherwise we'll strip all of the slashes off.
            $uri = static::format(Request::getPathInfo());

            static::segments($uri);

            return static::$uri = $uri;
        }
983600
protected function getCurrentUrl()
    {
        $schema = ((!empty($this->server['HTTPS']) && $this->server['HTTPS'] !== 'off') || (!empty($this->server['SERVER_PORT']) && $this->server['SERVER_PORT'] == 443)) ? 'https://' : 'http://';

        $host = isset($this->server['HTTP_HOST']) ? $this->server['HTTP_HOST'] : 'localhost';

        return $schema.$host.$this->server['REQUEST_URI'];
    }
635309
public function getBaseUri()
    {
        if (!isset($this->attributes[self::ATTRIBUTE_BASE_URI])) {
            $this->attributes[self::ATTRIBUTE_BASE_URI] = $this->detectBaseUri();
        }

        return $this->attributes[self::ATTRIBUTE_BASE_URI];
    }
493019
public function getUri()
    {
        if ($this->valid() === false) {
            require_once 'Zend/Uri/Exception.php';
            throw new Zend_Uri_Exception('One or more parts of the URI are invalid');
        }

        $password = strlen($this->_password) > 0 ? ":$this->_password" : '';
        $auth     = strlen($this->_username) > 0 ? "$this->_username$password@" : '';
        $port     = strlen($this->_port) > 0 ? ":$this->_port" : '';
        $query    = strlen($this->_query) > 0 ? "?$this->_query" : '';
        $fragment = strlen($this->_fragment) > 0 ? "#$this->_fragment" : '';

        return $this->_scheme
             . '://'
             . $auth
             . $this->_host
             . $port
             . $this->_path
             . $query
             . $fragment;
    }
1201002
private function getBaseUrl() {
        $uri = $this->getRequest()->getUri();
        return sprintf('%s://%s', $uri->getScheme(), $uri->getHost());
    }
354145
protected function getRewriteUri()
    {
        if ($this->uriSource === self::URI_SOURCE_SERVER_REQUEST_URI) {
            if (isset($_SERVER['REQUEST_URI'])) {
                $requestUri = explode('?', $_SERVER['REQUEST_URI']);
                if (!empty($requestUri[0])) {
                    return $requestUri[0];
                }
            }
        } else {
            if (isset($_GET['_url']) && !empty($_GET['_url'])) {
                return $_GET['_url'];
            }
        }

        return '/';
    }
1230564
public function getRequestUri()
    {
        if ($this->requestUri === null) {
            $this->requestUri = $this->detectRequestUri();
        }
        return $this->requestUri;
    }
273508
public function currentPath()
    {
        $requestURI = $this->serverVar('REQUEST_URI');
        $sciptName  = $this->serverVar('SCRIPT_NAME');
        return rtrim(parse_url($requestURI? : $sciptName, PHP_URL_PATH), '/');
    }
621705
protected function getCurrentUri()
  {
    // Get the current Request URI and remove rewrite base path from it (= allows one to run the router in a sub folder)
    $uri = substr($_SERVER['REQUEST_URI'], strlen($this->getBasePath()));
    // 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
    return '/' . trim($uri, '/');
  }
827726
public static function getCurrentURL()
    {
        $pageURL = 'http';
        if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on")
        {
            $pageURL .= "s";
        }
        $pageURL .= "://";
        if ($_SERVER["SERVER_PORT"] != "80")
        {
            $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
        }
        else
        {
            $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
        }
        return $pageURL;
    }
475883
public function getCleanUri(): string
    {
        if ($this->cleanUri === null) {
            $uri = Request::getUri()->getPath();
            if ($this->getBaseUrl() && strpos($uri, $this->getBaseUrl()) === 0) {
                $uri = substr($uri, \strlen($this->getBaseUrl()));
            }
            $this->cleanUri = $uri;
        }
        return $this->cleanUri;
    }
668472
public function getUri()
    {
        if (!isset($this->uri)) {
            $this->uri = $this->determineUri();
        }
        
        return $this->uri;
    }
653109
public function getUri(): string
    {
        foreach ($this->getParameterArray() as $parameter) {
            if (property_exists($this, $parameter)) {
                if (isset($this->$parameter)) {
                    $this->uri = str_replace('{' . $parameter . '}', $this->$parameter, $this->uri);
                } else {
                    $this->uri = str_replace('&'. $parameter . '={' . $parameter . '}', '', $this->uri);
                }
            }
        }
        foreach ($this->extraParameters as $parameter => $function) {
            $this->uri = str_replace('{' . $parameter . '}', $this->$function(), $this->uri);
        }
        return $this->uri;
    }
811843
public function rawUrl() {
        if ($this->rawUrl === null) {
            $this->rawUrl = (isset($this->serverVariables['REQUEST_URI']) ? $this->serverVariables['REQUEST_URI'] : '');
        }

        return $this->rawUrl;
    }
260692
public function getUri(){
		if (is_null($this->uri)){
			$this->uri = $this->makeUri();
		}

		return $this->uri;
	}
1241209
public function getUri()
    {
        $uri = rtrim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH),'/');
        $baseUri = $this->getBaseUri();
        $uri = str_replace($baseUri, '', $uri)?: '/';

        return $uri;
    }
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;
    }