Get url string

@param string $path
@param array $query
@param bool $context
@param bool|null $full
@return string
778424
public function makeUrl( $path = '', array $query = [], bool $context = false, bool $full = null ): string
	{
		if( is_null($full) )
		{
			$url = $this->base;
		}
		else if( $full )
		{
			$url = $this->getPrefix();
		}
		else
		{
			$url = $this->isBasePrefix() ? $this->base_prefix : "/";
		}

		if( is_array($path) )
		{
			$path = implode('/', $path);
		}
		else if( strlen($path) && $path[0] === "/" )
		{
			$path = substr($path, 1);
		}

		if( $context && $this->isContext() )
		{
			if( strlen($path) )
			{
				$path = substr($this->context, 1) . $path;
			}
			else
			{
				$path = trim($this->context, "/");
			}
		}

		return $this->getModeUrl($url, $path, $query);
	}
1205233
public function getPathUrl($path)
    {
        $path = $this->validatePath($path);

        $fullPath = $this->storagePath.implode("/", array_map("rawurlencode", explode("/", $path)));

        return Url::to($fullPath);
    }
1292738
public function buildUrl($url, array $query)
	{
		if (empty($query)) {
			return $url;
		}

		$parts = parse_url($url);

		$queryString = '';
		if (isset($parts['query']) && $parts['query']) {
			$queryString .= $parts['query'].'&'.http_build_query($query);
		} else {
			$queryString .= http_build_query($query);
		}

		$retUrl = $parts['scheme'].'://'.$parts['host'];
		if (isset($parts['port'])) {
			$retUrl .= ':'.$parts['port'];
		}

		if (isset($parts['path'])) {
			$retUrl .= $parts['path'];
		}

		if ($queryString) {
			$retUrl .= '?' . $queryString;
		}

		return $retUrl;
	}
198699
function get($path, $query = null, $headers = null, $curlOpts = null) {
        $payload = $this -> encodePostBody($query);
        
        if ($payload !== "") {
            if (strpos($path, '?')) {
                $url = $path . "&" . $payload;
            } else {
                $url = $path . "?" . $payload;
            }
        }else{
            $url = $path;
        }
        
        return $this -> request($url, self::HTTP_GET, '', $headers, $curlOpts);
    }
70869
public function get($url, array $query = [])
    {
        $url = $this->buildUrl($url, $query);
        $handle = $this->getHandler();

        return $this->run($handle, $url);
    }
95240
public function pageUrl($page, $full = false)
    {
        $currentPageUrl = $this->router->getCurrentRoute()->uri();

        $url = $this->addPageQuery(str_replace('{pageQuery?}', '', $currentPageUrl), $page, $full);

        foreach ((new RouteParameterBinder($this->router->getCurrentRoute()))->parameters(app('request')) as $parameterName => $parameterValue) {
            $url = str_replace(['{'.$parameterName.'}', '{'.$parameterName.'?}'], $parameterValue, $url);
        }

        $query = Request::getQueryString();

        $query = $query
            ? '?'.$query
            : '';

        return $this->urlGenerator->to($url).$query;
    }
441578
public function getApiUrl($path = '/', array $query = [])
    {
        $base = new Uri($this->apiUrl);
        $path = new Uri($path);

        foreach ($query as $key => $value) {
            $path = Uri::withQueryValue($path, $key, $value);
        }

        return (string) UriResolver::resolve($base, $path);
    }
536837
public function lurl($langcode, $path = '', array $query = array())
    {
        if ($langcode === $this->language->getDefault()) {
            $langcode = '';
        }

        return $this->url->language($langcode, $path, $query);
    }
301641
public function to(
        $path = null,
        ?array $query = [],
        ?string $fragment = null,
        bool $trailingSlash = false
    ): string {
        return $this->create(null, $this->appUrl, $path, $query, $fragment, $trailingSlash);
    }
1135740
protected function prepareRequestUrl(array $query)
    {
        $path = isset($query['from']['path']) ? $query['from']['path'] : null;

        $wheres = isset($query['wheres']) ? $query['wheres'] : null;

        $baseUrl = $this->host.$path;

        // Here we validate that there are any wheres in the
        // request. When none are provided we will return the
        // Request Url without the question mark.
        if (! is_null($wheres)) {
            return $baseUrl.'?'.$wheres;
        }

        return $baseUrl;
    }
414095
public static function get_uri($with_query=false) {
        $uri_without_get_params = parse_url(self::getHttpRequest()->getUri(), PHP_URL_PATH);

        return (!$with_query)?(
            ($uri_without_get_params != '/')?trim($uri_without_get_params, '/'):'index'
        ):([
            'without_get' => ($uri_without_get_params != '/')?trim($uri_without_get_params, '/'):'index',
            'query' => key($_GET),
        ]);
    }
39685
private function buildRequestUrl($path, $queryParams) {
		$url = $this->getBasePath() . $path;
		if (!empty($queryParams)) {
			$url = ($url . '?' . http_build_query($queryParams));
		}
		return $url;
	}
884252
public function buildRelativePath(string $path, string $query = ''): string
    {

        // If the query string has data, hash it.
        if ($query != '')
            $query = $this->hashString($query);

        return rtrim(rtrim($this->cache_path, '/') . rtrim($path), '/') .
            '/' . $query . '/';
    }
757042
public static function quoteUrl($query) {
        $queryParts = explode(' ', Str::assert($query, 'query'));

        return trim(array_reduce($queryParts, function($carry, $part) {
            return $carry . (Url::is($part) ? ('"' . $part . '" ') : ($part . ' '));
        }));
    }
1355882
private static function getUrlQueryString() {
        // The variable $_SERVER['QUERY_STRING'] is set by the server and can differ, e.g. it might hold additional
        // parameters or it might be empty (nginx).

        if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING'])) {
            $query = $_SERVER['QUERY_STRING'];
        }
        else {
            $query = strRightFrom($_SERVER['REQUEST_URI'], '?');
        }
        return $query;
    }
651103
public static function get_url($path, array $config = array(), $area = null)
	{
		return static::get($path, $config, $area)->get_url();
	}
1182
public static function fullUrl($url = '', $echo = true)
    {
        $url = Request::baseUrl() . self::url($url, false);
        if ($echo) {
            echo $url;
            return '';
        } else {
            return $url;
        }
    }