Build the realurl alias.

@param $params
@param $ref

@return string
4578
public function main($params, $ref)
    {
        $params['pathParts'] = array_filter($params['pathParts'], function ($v, $k) {
            return !empty($v);
        }, ARRAY_FILTER_USE_BOTH);

        return null;
    }
430028
public function urlForReference(string $user, string $repo, string $ref): string
    {
        $key = sprintf(self::CACHE_KEY_TEMPLATE, md5($user . $repo), 'ref_url_' . md5($ref));

        if (($latest = $this->getFromCache($key)) !== null) {
            return $latest;
        }

        [$type, $resolved] = $this->resolveRefType($ref);
        $repoURL = $this->urlForRepository($user, $repo);

        switch ($type) {
            case 'commit':
                $url = "${repoURL}/commit/${resolved}";
                break;

            case 'tag':
                $url = "${repoURL}/releases/tag/${resolved}";
                break;

            case 'pull':
                $url = "${repoURL}/pull/${resolved}";
                break;

            case 'branch':
            default:
                $url = "${repoURL}/tree/${resolved}";
        }

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

		return $url . $q . http_build_query( $params );
	}
1013417
protected function buildUrl($endpoint, $params)
    {
        $url = $this->getOAuthApiRoot();
        $scheme = parse_url($url, PHP_URL_SCHEME);
        $authority = parse_url($url, PHP_URL_HOST);
        $path = parse_url($url, PHP_URL_PATH);
        $path .= trim($endpoint, '/');
        $fragment = '';
        $uri = Uri::composeComponents(
            $scheme,
            $authority,
            $path,
            build_query($params),
            $fragment
        );
        return $uri;
    }
1063185
protected function build_rest_url($url, $params = array()) {
        $base = '';
        if (substr($this->_url, 0, 4) !== 'http') {
            $base .= 'http://';
        }

        $base .= $this->_url;
        if ($this->_port != 80) {
            $base .= ':' . $this->_port;
        }

        $rurl = new \Rapid\URL($base . '/api/' . $url, $params);
        return $rurl->out();
    }
1108854
final protected function generateUrl(string $name, array $params = []) : string
    {
        return $this->urlGenerator
            ->generate($name, $params);
    }
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;
    }
344813
public function ref($ref)
    {
        if (substr($ref, 0, 2) !== '#/') {
            // @todo Add support for external (http) refs?
            throw new Exception('Unsupported $ref "' . $ref . '", it should start with "#/"');
        }
        return $this->resolveRef($ref, '#/', $this, []);
    }
562240
protected function buildLinkUrl( $offset )
	{
		$param	= $this->getOption( 'param' );
		$param[$this->getOption( 'keyOffset' )] = $offset;
		$list	= array();
		foreach( $param as $key => $value )
			$list[]	= $key.$this->getOption( 'keyAssign' ).$value;
		$param	= implode( $this->getOption( 'keyParam' ), $list );
		$link	= $this->getOption( 'uri' ).$this->getOption( 'keyRequest' ).$param;
		return $link;
	}
609594
public function getUrl($path, array $params = [])
    {
        $parts = parse_url($this->baseUrl.'/'.trim($path, '/'));

        if ($parts === false) {
            throw new InvalidArgumentException('Not a valid path.');
        }

        $parts['path'] = '/'.trim($parts['path'], '/');

        if ($this->signature) {
            $params = $this->signature->addSignature($parts['path'], $params);
        }

        return $this->buildUrl($parts, $params);
    }
1348269
public function getUrl(array $params = [])
    {
        $params = $this->getParams($params);
        $constructedUrl = $this->url;
        if (count($params)) {
            $constructedUrl .= '?';
            foreach ($params as $key => $val) {
                $constructedUrl .= $key . '=' . $val . '&';
            }
            $constructedUrl = substr($constructedUrl, 0, -1);
        }
        return $constructedUrl;
    }
968731
public function getHrefWithDoAppend(array $params): string
    {
        $href = [];
        $href[] = static::makeParam('p', $this->p);
        $href[] = $this->parseParameter('do', $this->do == '_default' ? '' : $this->do, $params);

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

        return '?' . implode('&', $href);
    }
719977
public static function url($url, $params = null)
    {
        if (!is_array($params) || count($params) < 1) {
            return $url;
        }

        $pos = strpos($url, "?");

        # If there is no question mark in the url then set this as the first parameter
        if ($pos === false) {
            $url .= "?";

        # If the question mark is the last character then no appending is required
        } elseif ($pos != (mb_strlen($url) - 1)) {

            # If the last character is not an ampersand then append one
            if (mb_substr($url, -1) != "&") {
                $url .= "&";
            }
        }

        $url .= http_build_query($params);

        return $url;
    }
1102528
protected static function pluginUrl($params)
    {
        $result = '';
        if (!empty($params['route'])) {
            $route = $params['route'];
            unset($params['route']);
            $result = Url::toRoute($route, $params);
        } elseif (!empty($params['url'])) {
            $url = $params['url'];
            unset($params['url']);
            $result = Url::toRoute($url, $params);
        } else {
            $msg = __METHOD__ . ": text plugin '{{%url}}' must have 'route' or 'url' parameter."
                 . " Real params is " . var_export($params, true);
            Yii::error($msg);
        }
        return $result;
    }
771894
function build($url,$params=array()) {
		$params+=$this->hive['PARAMS'];
		if (is_array($url))
			foreach ($url as &$var) {
				$var=$this->build($var,$params);
				unset($var);
			}
		else {
			$i=0;
			$url=preg_replace_callback('/@(\w+)|\*/',
				function($match) use(&$i,$params) {
					$i++;
					if (isset($match[1]) &&
						array_key_exists($match[1],$params))
						return $params[$match[1]];
					return array_key_exists($i,$params)?
						$params[$i]:
						$match[0];
				},$url);
		}
		return $url;
	}
18139
private function createParam(Param $param, RefComment $comment = null)
    {
        $ref       = new RefParam();
        $ref->name = $param->var->name;

        if ($comment !== null) {
            $name = preg_quote($param->var->name, '/');
            if (preg_match('/@param\s+([^\s]+)\s+\$' . $name . '(?:\s*$|\s+(.*)$)/m', $comment->text, $matches)) {
                $ref->type        = $matches[1];
                $ref->description = isset($matches[2]) ? $matches[2] : null;
            }
        }

        if (!$ref->type) {
            $ref->type = $this->getTypeName($param->type);
        }

        $ref->byRef      = $param->byRef;
        $ref->isVariadic = $param->variadic;

        $ref->hasDefault = $param->default !== null;
        $ref->default    = $this->getValue($param->default);

        return $ref;
    }
853509
public function getUrl($name, $params = array())
	{
		if('http' === substr($name, 0, 4))
		{
			$domain = $name;
		}
		else
		{
			$domain = static::API_DOMAIN . $name;
		}
		return $domain . (empty($params) ? '' : ('?' . $this->http_build_query($params)));
	}