Get http scheme string.
Example: `"http:" | "https:"`
@return string
485185
public function GetScheme () {
		if ($this->scheme === NULL) {
			$this->scheme = (
				(isset($this->globalServer['HTTPS']) && strtolower($this->globalServer['HTTPS']) == 'on') ||
				$this->globalServer['SERVER_PORT'] == 443
			)
				? static::SCHEME_HTTPS
				: static::SCHEME_HTTP;
		}
		return $this->scheme;
	}
1234452
private static function resolveScheme(){
        $scheme = filter_input(INPUT_SERVER, "REQUEST_SCHEME");
        $https  = filter_input(INPUT_SERVER, "HTTPS");

        if(is_string($scheme)){
            return strtolower($scheme);
        }

        if(null !== $https){
            if(is_bool($https)){
                return $https ? "https" : "http";
            }

            return "off" === $https ? "http" : "https";
        }

        return "http";
    }
624098
public function getNormalizedUrl() {
		$parts = parse_url( $this->url );

		$scheme = isset( $parts['scheme'] ) ? $parts['scheme'] : 'http';
		$port = isset( $parts['port'] ) ?
			$parts['port'] : ( $scheme === 'https' ? '443' : '80' );
		$host = isset( $parts['host'] ) ? strtolower( $parts['host'] ) : '';
		$path = isset( $parts['path'] ) ? $parts['path'] : '';

		if ( ( $scheme === 'https' && $port != '443' ) ||
			( $scheme === 'http' && $port != '80' )
		) {
			$host = "{$host}:{$port}";
		}
		return "{$scheme}://{$host}{$path}";
	}
144085
public function getURL() {
		return $this->scheme.'://'.$this->domain.$this->path.($this->parameters ? '?'.http_build_query($this->parameters) : '');
	}
341035
protected function toString(?string $scheme, string $path): string
    {
        if ($scheme) {
            return $scheme . '://' . $path;
        }

        return $path;
    }
300017
public function getURL(): ?string
    {
        if ($this->base !== null) {
            $list = [];
            $queryList = $this->query->getList();
            foreach ($queryList as $queryItem) {
                $list[$queryItem->name] = $queryItem->value;
            }
            return $this->base . implode('/', array_map('urlencode', explode('/', (string) $this->path))) . (empty($list) ? '' : '?' . http_build_query($list));
        }
        return null;
    }
123466
public function getUrl()
    {
        $https = $this->isHTTPS();

        $protocol = strtolower($_SERVER["SERVER_PROTOCOL"]);
        $protocol = substr($protocol, 0, strpos($protocol, "/")) . ($https ? "s" : "");

        $port = $_SERVER["SERVER_PORT"];
        $port = ($port == 80 && !$https) || ($port == 443 && $https) ? "" : ":$port";

        $host = isset($_SERVER["HTTP_HOST"]) ? $_SERVER["HTTP_HOST"] : null;
        $host = $host ? $host : $_SERVER["SERVER_NAME"] . $port;

        return "$protocol://$host" . $_SERVER["REQUEST_URI"];
    }
681302
public function toString()
    {
        $result = '';

        if (!empty($this->scheme)) {
            $result.= $this->scheme . ':';
        }

        if (!empty($this->authority)) {
            $result.= '//' . $this->authority;
        }

        $result.= $this->path;

        if (!empty($this->query)) {
            $result.= '?' . $this->query;
        }

        if (!empty($this->fragment)) {
            $result.= '#' . $this->fragment;
        }

        return $result;
    }
249026
public static function curPHPUrl() {
        $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
              ? 'http'
              : 'https';
        $port = "";
        if ( isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != "80" && $_SERVER['SERVER_PORT'] != "443" &&
            strpos(':', $_SERVER['HTTP_HOST']) < 0 ) {
            $port =  ':' . $_SERVER['SERVER_PORT'] ;
        }
        $http_url = $scheme .
                              '://' . $_SERVER['HTTP_HOST'] .
                              $port .
                              $_SERVER['REQUEST_URI'];
        return $http_url;
    }
583973
public function getUrlProto()
    {
        $proto = '';
        
        if (!empty($_SERVER['HTTP_FORWARDED'])) {
            extract($this->parseForwardedString($_SERVER['HTTP_FORWARDED']));
        }
        
        if (empty($proto)) {
            if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
                $proto = explode(',', strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']));
                $proto = $proto[0];
            } elseif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
                $proto = 'https';
            } else {
                $proto = 'http';
            }
        }
        
        return $proto;
    }
202643
public function get($scheme = self::REL)
    {
        $data = $this->data;
        if ($scheme == self::REL) {
            unset($data['scheme'], $data['host'], $data['user'], $data['pass'], $data['port']);
            return $this->build($data);
        }
        if (!isset($data['host'])) {
            $data['host'] = $this->request->getHost();
        }
        if (!isset($data['scheme'])) {
            $scheme = self::SHORT_ABS;
        }

        if ($scheme == self::SHORT_ABS) {
            unset($data['scheme']);
            $url = $this->build($data, '//');
        } else {
            $url = $this->build($data);
        }

        return $this->asProtect($url, $data['host']);
    }
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;
    }
1205703
function() {
  var server = this.get("server");
  if (!server)
    return null;
  var address = server.address();
  var scheme = server instanceof https.Server ? 'https' : 'http';
  return util.format("%s://%s:%d", scheme, address.address, address.port);
}
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;
    }
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);
    }
251325
public function getHeaderString()
    {
        $parts = [
            $this->name . '=' . rawurlencode($this->value),
            $this->getMaxAgeString(),
            $this->getExpiresString(),
            $this->getDomainString(),
            $this->getPathString(),
            $this->getSecureString(),
            $this->getHttpOnlyString(),
        ];

        $filteredParts = array_filter($parts);

        return implode('; ', $filteredParts);
    }
279883
public function getUrls() : string
    {
        $regex = '((https?|ftp)://)?'; // SCHEME
        $regex .= '([a-z0-9+!*(),;?&=$_.-]+(:[a-z0-9+!*(),;?&=$_.-]+)?@)?'; // User and Pass
        $regex .= '([a-z0-9\-\.]*)\.(([a-z]{2,4})|([0-9]{1,3}\.([0-9]{1,3})\.([0-9]{1,3})))'; // Host or IP
        $regex .= "(:[0-9]{2,5})?"; // Port
        $regex .= '(/([a-z0-9+$_%-]\.?)+)*/?'; // Path
        $regex .= '(\?[a-z+&\$_.-][a-z0-9;:@&%=+/$_.-]*)?'; // GET Query
        $regex .= '(#[a-z_.-][a-z0-9+$%_.-]*)?'; // Anchor
        return $regex;
    }