Build the final URL to be passed

@param array $queryParams an array of all the query parameters

@return string
546931
private function buildUrl($queryParams = null)
    {
        $path = '/' . implode('/', $this->path);
        if (isset($queryParams)) {
            $path .= '?' . http_build_query($queryParams);
        }
        return sprintf('%s%s%s', $this->host, $this->version ?: '', $path);
    }
469197
public function buildAuthUrl(array $params = [])
    {
        $defaultParams = [
            'appid' => $this->clientId,
            'response_type' => 'code',
            'redirect_uri' => $this->getReturnUrl(),
        ];
        if (!empty($this->scope)) {
            $defaultParams['scope'] = $this->scope;
        }

        if ($this->validateAuthState) {
            $authState = $this->generateAuthState();
            $this->setState('authState', $authState);
            $defaultParams['state'] = $authState;
        }

        return $this->composeUrl($this->authUrl, array_merge($defaultParams, $params));
    }
661411
protected function get_url( $url, $params ) {
		if ( empty( $params ) ) {
			return $url;
		}
		$q = strpos( $url, '?' ) !== false ? '&' : '?';

		return $url . $q . http_build_query( $params );
	}
288921
public function createUrl(array $parameters = array())
    {
        $final_parameters = $this->getFinalParameters();
        $path = $this->getBaseURL();

        // Override default parameters
        $final_parameters = array_merge($final_parameters, $parameters);

        return $path . "?" . http_build_query($final_parameters, null, '&') . $this->buildFragment();
    }
180141
public static function makeUrl(array $params): string
    {
        $href = [];

        foreach ($params as $key => $value) {
            $href[] = static::makeParam($key, (string)$value);
        }

        return '?' . implode('&', $href);
    }
428008
public function build(array $params = array())
	{
		$final_url = $this->getProtocol() . '://' . $this->getHost() . $this->getPortForBuild() . $this->getPath();
		$final_params = array_merge($this->getParams(), $params);

		list($final_url, $final_params) = $this->unmaskUrl($final_url, $final_params);

		if ( !empty($final_params) ) {
			$final_url .= '?' . http_build_query($final_params);
		}

		if ( $this->getAnchor() != '' ) {
			$final_url .= '#' . $this->getAnchor();
		}

		return $final_url;
	}
1309718
public static function replaceQueryParamsInUrl(array $queryParams, $url)
    {
        if (empty($queryParams)) {
            return $url;
        }
        $parsedUrl = self::parseUrl($url);
        $queryString = isset($parsedUrl['query']) ? $parsedUrl['query'] : '';
        foreach ($queryParams as $param => $value) {
            $queryString = self::replaceQueryParam($param, $value, $queryString);
        }
        $parsedUrl['query'] = $queryString;
        return self::buildUrl($parsedUrl);
    }
1157520
public function getUrlForMergedParameters($queryParameters)
    {
        if ($this->hasQueryString()) {
            $querystring = new QueryString($this->getQueryString());
            $querystring->addParameters($queryParameters);
            $queryParameters = $querystring->toArray();
        }

        return $this->getUrlForParameters($queryParameters);
    }
700126
protected function paramsToUrl($params) {
        if (!$params) return '';

        $urlp = array();
        foreach ($params as $p => $val) {
            array_push($urlp, urlencode($p) . '=' . urlencode($this->formatQueryParameterValue($val)));
        }
        $result = '?' . implode ('&' , $urlp);
        return $result;
    }
1358913
protected function buildUrl($uri, $params)
    {
        $host = $this->buildHostString();

        if (strpos($uri, "/") !== 0) {
            $uri = "/" . $uri;
        }

        $url = $host . $uri;


        if ($params === null) {
            $params = array();
        }

        $url .= $this->buildQueryString($params);

        return $url;
    }
1044017
protected function buildHttpQuery(array $parameters):string
    {
        return http_build_query(
            array_map(
                function ($parameter) {
                    if (! is_bool($parameter)) {
                        return $parameter;
                    }

                    return $parameter ? 'true' : 'false';
                },
                $parameters
            )
        );
    }
224412
protected function buildUrl($requestUrl, $requestParams = [])
    {
        if (!empty($requestParams)) {
            $requestUrl = $requestUrl . '?' . http_build_query($requestParams);
        }

        return $requestUrl;
    }
143782
protected function processQueryParameters($queryParams)
    {
        foreach ($queryParams as $name => $value) {
            if (is_bool($value)) {
                $queryParams[$name] = $value ? 'true' : 'false';
            }
        }
        return $queryParams;
    }
107939
protected function getPageFromQueryParams(array $query_params)
    {
        $page = 1;

        if (isset($query_params['page'])) {
            $page = (integer) $query_params['page'];
        }

        return $page < 1 ? 1 : $page;
    }
220522
public function buildQuery(array $params = [])
    {
        $params = array_merge($params, [
          'user_login' => $this->login,
          'api_key' => $this->apiKey
        ]);
        return http_build_query($params);
    }
921483
private function prepareUrl($path, $queryParams)
    {
        $url = $this->getUrl().$path;

        if (!empty($queryParams)) {
            $url = $url.'?'.http_build_query($queryParams);
        }

        return $url;
    }
1320600
protected function getURL(array $params):string{
		$url = '';

		if($this->scheme){
			$url .= $this->scheme.':';
		}

		if($this->host){
			$url .= '//'.$this->host;

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

		}

		if($this->path){
			$url .= $this->path;
		}

		if(!empty($params)){
			$url .= '?'.http_build_query($params);
		}

		if($this->fragment){
			$url .= '#'.$this->fragment;
		}

		return $url;
	}