Getter for the url will append protocol if one does not exist.

@return string
174435
public function getUrl()
    {
        if (!$this->url) {
            throw new InvalidUrlException();
        }

        $url = $this->url;

        if (! parse_url($this->url, PHP_URL_SCHEME)) {
            $url = $this->getProtocol().$url;
        }

        return $url;
    }
136866
protected function buildUrl()
    {
        $url = '';

        if (isset($this->info['scheme'])) {
            $url .= $this->info['scheme'].'://';
        }
        if (isset($this->info['host'])) {
            $url .= $this->info['host'];
        }

        $url .= $this->getPath();

        if (!empty($this->info['query'])) {
            $url .= '?'.http_build_query($this->info['query']);
        }
        if (isset($this->info['fragment'])) {
            $url .= '#'.$this->info['fragment'];
        }

        return $url;
    }
1194252
public function getUrlParams()
    {
        if ($this->_urlParams === null) {
            $pa = @parse_url($this->getUrl());
            $pa['scheme'] = isset($pa['scheme']) ? strtolower($pa['scheme']) : 'http';
            if ($pa['scheme'] !== 'http' && $pa['scheme'] !== 'https') {
                return false;
            }
            if (!isset($pa['host'])) {
                return false;
            }
            if (!isset($pa['path'])) {
                $pa['path'] = '/';
            }
            // basic auth
            if (isset($pa['user']) && isset($pa['pass'])) {
                $this->applyBasicAuth($pa['user'], $pa['pass']);
            }
            // convert host to IP address
            $port = isset($pa['port']) ? intval($pa['port']) : ($pa['scheme'] === 'https' ? 443 : 80);
            $pa['ip'] = $this->hasHeader('x-server-ip') ?
                $this->getHeader('x-server-ip') : self::getIp($pa['host']);
            $pa['conn'] = ($pa['scheme'] === 'https' ? 'ssl' : 'tcp') . '://' . $pa['ip'] . ':' . $port;
            // host header
            if (!$this->hasHeader('host')) {
                $this->setHeader('host', strtolower($pa['host']));
            } else {
                $pa['host'] = $this->getHeader('host');
            }
            $this->_urlParams = $pa;
        }
        return $this->_urlParams;
    }
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;
    }
33690
public function getFullUrl()
    {
        $isSecure = $this->isSecure();
        $srvProtocol = strtolower($this->server->get('SERVER_PROTOCOL'));
        $protocol = substr($srvProtocol, 0, strpos($srvProtocol, '/')).(($isSecure) ? 's' : '');
        $port = $this->getPort();
        $port = ((!$isSecure && $port != '80') || ($isSecure && $port != '443')) ? ":$port" : '';

        return $protocol.'://'.$this->getHost().$port.$this->server->get('REQUEST_URI');
    }
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;
    }
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}";
	}
166313
public function getURL()
    {
        $url = $this->_internal_request->get_normalized_http_url();

        if ($this->getMethod() == AnHttpRequest::GET) {
            $url = $this->_internal_request->to_url();
        }

        return $url;
    }
1287475
public function getUrl()
    {
        $this->validateMethod();

        $apiVersion = UrlManipulator::forceSlashPrefix($this->apiVersion);
        $endpoint   = UrlManipulator::forceSlashPrefix($this->getEndpoint());

        $url = $apiVersion.$endpoint;

        if ($this->getMethod() !== 'POST') {
            $params = $this->getParams();
            $url = UrlManipulator::appendParamsToUrl($url, $params);
        }

        return $url;
    }
821551
public function getUrlPK()
    {
        if ($this->urlPK == null) {
            $this->urlPK = $this->getPrimaryKey();
        }

        return $this->urlPK;
    }
744965
public function getEntityUrl() : string
    {
        $result = Router::url(
            [
                'prefix' => false,
                'controller' => $this->table->getTable(),
                'action' => 'view',
                $this->entity->id
            ],
            true
        );

        return $result;
    }
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;
		
	}
691287
public function getAppURL()
    {
        if (empty($this->appURL)) {
            $hostname = $this->getHostname();
            if (empty($hostname)) {
                $this->appURL = config('app.url');
            } else {
                $protocol = $this->getProtocol();
                $this->appURL = ($protocol ?: 'http') . '://' . $hostname . '/' . $this->getBaseDir();
            }
        }

        return $this->appURL;
    }
805108
public function getUrl()
    {
        $proto = $this->getUrlProto();
        $host = $this->getUrlHost();
        $port = $this->getUrlPort($proto);
        

        $url = $proto . '://' . $host;
        if (($proto == 'https' && $port != 443) || ($proto == 'http' && $port != 80)) {
            $url .= ':' . $port;
        }

        if (isset($_SERVER)) {
            $path = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
            $url .= $path;
        }

        if ($host == 'unknown') {
            $url = null;
        }

        return $url;
    }
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;
    }
220556
private function generateUrl(): string
    {
        static $re = '/\%5B\d+\%5D/m';
        static $subst = '%5B%5D';

        $query = [];
        /**
         * @var IArgument
         */
        foreach ($this->arguments as $key => $value) {
            $query[$key] = $value->toPrimitive();
        }

        foreach ($this->mergeableArguments as $key => $value) {
            $query[$key] = $value->toPrimitive();
        }

        foreach ($this->stackableArguments as $key => $value) {
            $query[$key] = $value->toArray();
        }

        $queryArg = http_build_query($query, null, '&', PHP_QUERY_RFC3986);

        $fullUrl = $this->routeUrl() . '?' . preg_replace($re, $subst, $queryArg);

        return $fullUrl;
    }
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'])
        ));
    }