Return the current URL without path or query string or protocol
@return string
333095
protected function vhost()
	{
		$host = rtrim($_SERVER['HTTP_HOST']);
		if (empty($host))
		{
			$host = $_SERVER['SERVER_NAME'];
		}
		$host  = preg_replace('/[^A-Za-z0-9\[\]\.:-]/', '', $host);
		
		if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) 
		{
			$xhost = preg_replace('/[^A-Za-z0-9\[\]\.:-]/', '', rtrim($_SERVER['HTTP_X_FORWARDED_HOST'],'/'));
		} 
		else 
		{
			$xhost = '';
		}
		
		return (!empty($xhost) ? $xhost : $host) ;
	}
1034669
public static function GetUrl () {
		return static::LasyClassVarAccessCallback('url', function () {return sprintf('%s://%s%s%s', strtolower(static::GetCurrnetProtocol()), static::GetDomainName(), static::GetPath(), !empty($query_parameter = static::GetParameters()->getRecursiveArrayCopy()) ? sprintf('?%s', http_build_query($query_parameter)) : '');});
	}
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;
        }
1301575
protected function currentUrlSsl()
    {
        if (isset(static::$static[__FUNCTION__])) {
            return static::$static[__FUNCTION__];
        }
        if (!empty($_SERVER['SERVER_PORT'])) {
            if ((int) $_SERVER['SERVER_PORT'] === 443) {
                return static::$static[__FUNCTION__] = true;
            }
        }
        if (!empty($_SERVER['HTTPS'])) {
            if (filter_var($_SERVER['HTTPS'], FILTER_VALIDATE_BOOLEAN)) {
                return static::$static[__FUNCTION__] = true;
            }
        }
        if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
            if (strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0) {
                return static::$static[__FUNCTION__] = true;
            }
        }
        return static::$static[__FUNCTION__] = false;
    }
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;
    }
676079
public function getCurrentUrl()
    {
        $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
        $path = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
        return $this->getCurrentScheme() . '://' . $host . $path;
    }
732386
private function currentURL() {
        $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;
    }
393035
protected function getCurrentUri()
    {
        $uri = isset($_SERVER['REQUEST_URI'])
            ? $_SERVER['REQUEST_URI']
            : false;
        if (!$uri) {
            $uri = $_SERVER['SCRIPT_NAME'];
            if (isset($_SERVER['argv']) || isset($_SERVER['QUERY_STRING'])) {
                $uri .= '?';
                $uri .= isset($_SERVER['argv'])
                    ? $_SERVER['argv'][0]
                    : $_SERVER['QUERY_STRING'];
            }
        }
        return 'http'
            . (isset($_SERVER['HTTPS']) ? 's' : '')
            . '://'
            . $_SERVER['HTTP_HOST']
            . '/'
            . ltrim($uri, '/');
    }
1307678
public function pathInfo() {
        $url = $this->url();
        $index = strpos($url, "?");
        if ($index) {
            $url = substr($url, 0, $index);
        }

        return $url;
    }
400561
private function getCurrentPath()
    {
        if (is_null($this->currentPath)) {
            $this->currentPath = $this->str($this->httpRequest()->getCurrentUrl(true)->getPath());
        }

        return $this->currentPath;
    }
211315
private function getCurrentUrlPath()
    {
        if ($this->path) {
            return $this->path;
        }

        /**
         * check if the path is empty otherwise
         * set it with the server variable and if there's no server variable set it as the default delimiter [/] the root
         */
        $this->path = !empty($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null;
        $this->urlPart = $this->parsePath($this->path);

        return $this->path;
    }
353898
protected function get()
    {
        $url = '';
        if ($this->scheme) {
            $url = $this->scheme . ':';
        }
        if ($this->host) {
            $url .= '//' . $this->authority();
        }
        if ($this->path) {
            $url .= '/' . ltrim($this->path, '/');
        }
        if ($this->query) {
            $url .= '?' . $this->query;
        }
        if ($this->fragment) {
            $url .= '#' . $this->fragment;
        }

        return $url;
    }
876998
public function getProtocol(): string {
		if ($this->requestedUrl->hasScheme()) {
			return $this->requestedUrl->getScheme();
		}
		
		return self::PROTOCOL_HTTP;
	}
336742
public function getUrl()
    {
        $scheme = $this->scheme!=null ? $this->scheme . '://' : MString::EMPTY_STRING;
        $host = $this->host!=null ? $this->host : MString::EMPTY_STRING;
        $port = $this->port!=null ? ':' . $this->port : MString::EMPTY_STRING;
        $user = $this->user!=null ? $this->user : MString::EMPTY_STRING;
        $pass = $this->password!=null ? ':' . $this->password : MString::EMPTY_STRING;
        $pass = ($user||$pass) ? "$pass@" : MString::EMPTY_STRING;
        $path = $this->path!=null ? $this->path : MString::EMPTY_STRING;
        $query = $this->query!=null ? '?' . $this->query : MString::EMPTY_STRING;
        $fragment = $this->fragment!=null ? '#' . $this->fragment : MString::EMPTY_STRING;

        return $scheme . $user . $pass . $host . $port . $path . $query . $fragment;
    }
474005
public function getAbsoluteUrl()
    {
        $https = Kwf_Util_Https::domainSupportsHttps($this->getDomain());
        $protocol = $https ? 'https' : 'http';
        return $protocol . '://'.$this->getDomain().$this->url;
    }
63223
public static function current():string
    {
        if (php_sapi_name() === 'cli') {
            throw new \RuntimeException('function Url::current can not run in the cli.');
        }
        $protocol = (!empty($_SERVER['HTTPS'])
            && $_SERVER['HTTPS'] !== 'off'
            || $_SERVER['SERVER_PORT'] === 443) ? 'https://' : 'http://';
        return $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    }
501407
public function getUrlWithoutArgs()
    {
        $url = $this->getUrl();
        if (($pos = strpos($url, '?')) !== false) {
            $url = substr($url, 0, $pos);
        }
        return $url;
    }