@param string $baseUrl
@param array  $query
@param string $fragment

@return string
183519
protected function assembleUrl($baseUrl, array $query = [], $fragment = '') {
			if ($query)
				$baseUrl .= '?' . http_build_query($query);

			if ($fragment)
				$baseUrl .= '#' . $fragment;

			return $baseUrl;
		}
258055
public function getRequestUrl($resourceName, $query)
    {
        $requestUrl = $this->endpoint . '/' . $resourceName;
        if ($query) {
            if (is_array($query)) {
                $query = http_build_query($query);
            }
            $requestUrl .= '?' . $query;
        }

        return $requestUrl;
    }
415239
private function buildBaseString($baseURI, $method, $params)
    {
        $r = $this->normalizeParameters($params);

        return $method.'&'.$this->encode($baseURI).'&'.$this->encode($r);
    }
1049024
protected function buildUrl($url, $query = [])
    {
        $url = explode('?', $url, 2);
        if (count($url) == 2) {
            parse_str($url[1], $query0);
            $query = array_merge($query0, $query);
        }
        $query['apikey'] = $this->key;

        $url = $url[0];

        if (strpos($url, $this->baseUrl) === false) {
            $url = $this->baseUrl . $url;
        }

        return $this->uriFactory->createUri($url)
            ->withQuery(http_build_query($query));
    }
828114
public function urlPagination($pagination, array $query = [])
    {
        $query[MbDatabaseQueryBuilder::getPagination()] = $pagination;
        $query = array_replace($this->query(), $query);

        return $this->url() . '?' . http_build_query($query);
    }
49656
public static function filterQueryOrFragment($query)
    {
        if (!\is_string($query)) {
            throw new \InvalidArgumentException('Uri query string and fragment must be a string');
        }

        return preg_replace_callback(
            '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/u',
            function ($match) {
                return rawurlencode($match[0]);
            },
            $query
        ) ?? '';
    }
1198223
public static function appendParamsUrl($baseUrl, $params)
    {
        foreach ($params as $key => &$value) {
            if (is_bool($value)) {
                $value = self::getBoolString($value);
            }
        }

        return $baseUrl . '?' . http_build_query($params);
    }
526944
private function buildBaseString($baseURI, $method, $params)
    {
        $return = array();
        ksort($params);

        foreach($params as $key => $value)
        {
            $return[] = rawurlencode($key) . '=' . rawurlencode($value);
        }

        return $method . "&" . rawurlencode($baseURI) . '&' . rawurlencode(implode('&', $return));
    }
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);
	}
681204
public function baseUrl($targetPath = null)
    {
        if (!isset($this->baseUrl)) {
            throw new RuntimeException(sprintf(
                'The base URI is not defined for [%s]',
                get_class($this)
            ));
        }

        if ($targetPath !== null) {
            return $this->createAbsoluteUrl($this->baseUrl, $targetPath);
        }

        return rtrim($this->baseUrl, '/').'/';
    }
983856
private function getResourceParam(ResourceParam $resourceParam, array $query)
    {
        $uri = $resourceParam->templated === true ? uri_template($resourceParam->uri, $query) : $resourceParam->uri;
        $resource = $this->injector->getInstance(ResourceInterface::class);
        $resourceResult = $resource->get->uri($uri)->eager->request();
        $fragment = parse_url($uri, PHP_URL_FRAGMENT);

        return $resourceResult[$fragment];
    }
120422
private function buildGetUrl($url, array $query = [])
    {
        // Merge global and request queries
        $query = array_merge(
            Arr::get($this->config, 'query', []),
            $query
        );

        // Append query
        if ($query = http_build_query($query)) {
            $url .= strpos($url, '?') ? $query : "?{$query}";
        }

        return $url;
    }
674597
protected static function normalizeFragment(?string $fragment): ?string
    {
        if ($fragment === null) {
            return null;
        }

        if (!static::isValidFragment($fragment)) {
            $message = sprintf('Invalid URI fragment: %s', $fragment);
            throw new DomainException($message);
        }

        return static::encodeFragment(static::decode($fragment, static::UNRESERVED_SET));
    }
348568
public function setBaseUrl($baseUrl)
    {
        if (substr($baseUrl, 0, 2) === '//') {
            $baseUrl = 'http:'.$baseUrl;
            $this->isRelativeDomain = true;
        }

        $this->baseUrl = rtrim($baseUrl, '/');
    }
742266
public function setBaseUrl($baseUrl)
    {
        if ($baseUrl) {
            if (UrlHelper::isUrl($baseUrl)) {
                $this->baseUrl = rtrim($baseUrl, '/') . '/';
            } else {
                $this->baseUrl = rtrim($baseUrl, '/') . '/';
            }
        }

        return $this;
    }
777378
public function getUri($uri, $withBaseUrl = true)
    {
        $baseUrl = $withBaseUrl ? $this->baseUrl : '';
        if (!is_array($uri)) {
            return $baseUrl.$uri;
        }
        list($uri, $vars) = $uri;
        $uri = $baseUrl.$uri;
        if (!is_array($vars)) {
            throw new InvalidArgumentException();
        }
        foreach ($vars as $key => $value) {
            $uri = str_replace('{'.$key.'}', $value, $uri);
        }

        return $uri;
    }
983657
public function getAbsoluteUrl($withFragment=true)
    {              
        if($this->isCrawlable() === false && empty($this->getFragment())){
            $absolutePath = $this->getOriginalUrl();
        }else{            
            if($this->parentLink !==null){
                $newUri = \GuzzleHttp\Psr7\UriResolver::resolve($this->parentLink,$this);
            }else{
                $newUri = $this;
            }
            
            $absolutePath = GuzzleUri::composeComponents(
                $newUri->getScheme(),
                $newUri->getAuthority(),
                $newUri->getPath(),
                $newUri->getQuery(),
                $withFragment===true?$this->getFragment():""
            );
        }
        
        return $absolutePath;
    }