Get URL as string

@return string
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;
    }
938667
public function getUrlBase() : string
    {
        $url = sprintf('%s://%s', $this->getScheme(), $this->host);
        $isStandardPort = ($this->port === ($this->isSecure ? 443 : 80));

        return $isStandardPort ? $url : $url . ':' . $this->port;
    }
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;
    }
637238
public function toString() {
        $str = $this->protocol . '://' . $this->hostName;
        if ($this->protocol==='http' && $this->portNumber==80) {
            //don't add port
        } else if ($this->protocol==='https' && $this->portNumber==443) {
            //don't add port
        } else {
            $str .= ':'. $this->portNumber;
        }
        return $str;
    }
7961
private function _getUrl()
    {
        return new Url(sprintf(
            '%s://%s:%d%s',
            $this->_getScheme(),
            $this->_server['SERVER_NAME'],
            $this->_getPort(),
            $this->_uriRelativeToHost($this->_server['REQUEST_URI'])
        ));
    }
15288
public function GetURLString()
    {
        $sURLString = $this->GetFromInternalCache('sURLString');

        if (is_null($sURLString)) {
            $oType = $this->GetFieldShopVariantType();

            $urlNormalizationUtil = $this->getUrlNormalizationUtil();
            if (empty($oType->fieldUrlName)) {
                $oType->fieldUrlName = $urlNormalizationUtil->normalizeUrl($oType->fieldName);
            }
            if (empty($this->fieldUrlName)) {
                $this->fieldUrlName = $urlNormalizationUtil->normalizeUrl($this->fieldUrlName);
            }

            $sURLString = $oType->fieldUrlName.'/'.$this->fieldUrlName;
            $this->SetInternalCache('sURLString', $sURLString);
        }

        return $sURLString;
    }
928019
private function generateUrl()
    {
        $url = '';

        // Create the URL.
        switch ($this->link_type) {
            case self::LINK_ACTION:
                $url = action(...$this->link_value);
                break;
            case self::LINK_ROUTE:
                $url = route(...$this->link_value);
                break;
            case self::LINK_URL:
                $url = env('APP_NO_SSL', true) ? url(...$this->link_value) : secure_url(...$this->link_value);
                break;
            case self::LINK_INSECURE_URL:
                $url = url(...$this->link_value);
                break;
            case self::LINK_EXTERNAL_URL:
                $url = stripos($this->link_value[0], 'http') === false ? 'http://' : '';
                $url .= $this->link_value[0];
                break;
        }

        return $url;
    }
153327
public static function getCurrentUrl() 
    {
        $pageURL = 'http';
        
        if (isset($_SERVER["HTTPS"])) 
        {
            $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;
    }
9844
protected function devideUrl()
    {
        $parts = explode('/', $this->getPath());
        $cnt   = count($parts);
        for ($i = 0; $i < $cnt; $i++) {
            $parts[$i] = trim($parts[$i]);
        }
        return $parts;
    }
1228018
public function getRouteURL()
    {
        if (empty($this->routeUrl)) {
            $param = trim(Server::get('REQUEST_URI'), '/');

            // strip base directory from request url
            $base_dir = $this->getBaseDir();
            $param = substr($param, strlen($base_dir));

            // Strip query string (?a=b) from Request Url
            $path = trim(explode('?', $param)[0], '/');
            $this->routeUrl = strtolower($path);

            if (empty($this->routeUrl)) {
                $this->routeUrl = '/';
            }
        }

        return $this->routeUrl;
    }
603731
public String getUrl(){
		final StringBuilder sb = new StringBuilder();
		sb.append("http://");
		sb.append(getHttpConfiguration().getBindHost().get());
		sb.append(":");
		sb.append(getHttpConfiguration().getPort());
		
		return sb.toString();
	}
72141
public function getUrl()
    {
        if ($this->getMethod() == "GET" && $this->getQuery()) {
            $this->_sUrl = $this->_sUrl . "?" . $this->getQuery();
        }

        return $this->_sUrl;
    }
143343
public static function getGetString(){
		self::init();
		$values=array_filter(self::$variables,function($value){return $value!='';});
		if(empty($values)) return '';
		return '?'.http_build_query($values);
		}
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)) : '');});
	}
590453
public function getUrl() {
		
		$sefParams = array();
		$cgiParams = array();
		
		// queue all parameters
		foreach ($this->vars as $key=>$val) {
			if (is_int($key)) {
				$sefParams[] = $val;
			} else {
				$cgiParams[$key] = $val;
			}
		}

		$url = $this->module . '/' . $this->action;
		
		// add slashed params
		if (count($sefParams)) {
			$url .= '/' . implode('/', $sefParams);
		}

		// add ordering
		if ($this->order) {
			$url .= '/order-' . $this->order;
		}
		
		// add pagination
		if ($this->page) {
			$url .= '/page-' . $this->getPage();
		}
		
		// add associative params
		if (count($cgiParams)) {
			$url .= '?' . http_build_query($cgiParams);
		}

		return $url;
		
	}
495754
public function toString()
    {
        $url = $this->scheme.':';
        if (trim($this->host) != '') {
            $url .= '//';
            if (trim($this->user) != '') {
                $url .= $this->user.((trim($this->pass) != '')?':'.$this->pass:'').'@';
            }
            $url .= $this->host;

            if (trim($this->port) != '') {
                $url .= ':'.$this->port;
            }
        }

        $url .= (trim($this->path) != '')?$this->path:'';
        $url .= (trim($this->query) != '')?'?'.$this->query:'';
        $url .= (trim($this->fragment) != '')?'#'.$this->fragment:'';

        if (!self::isValid($url)) {
            throw new RuntimeException('Built URL is not a valid one: '.$url);
        }

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