Build the realurl alias.

@param $params
@param $ref

@return string
339048
public function main($params, $ref)
    {
        $value = $params['value'];
        if (empty($value)) {
            return null;
        }

        if ($params['decodeAlias']) {
            return $this->alias2id($value);
        }

        return $this->id2alias($value);
    }
167047
public function url($path, array $params = [])
    {
        $urlBuilder = UrlBuilderFactory::create($this->config['base_url'], $this->config['sign_key']);

        return $urlBuilder->getUrl($path, $params);
    }
719553
function alias($name,$params=[],$query=NULL) {
		if (!is_array($params))
			$params=$this->parse($params);
		if (empty($this->hive['ALIASES'][$name]))
			user_error(sprintf(self::E_Named,$name),E_USER_ERROR);
		$url=$this->build($this->hive['ALIASES'][$name],$params);
		if (is_array($query))
			$query=http_build_query($query);
		return $url.($query?('?'.$query):'');
	}
845370
public function commitComments($ref, array $parameters = [])
    {
        $data = $this->client->repositories()->commitComments($this->id, $ref, $parameters);

        $comments = array();
        foreach ($data as $comment) {
            $comments[] = CommitNote::fromArray($this->getClient(), $comment);
        }

        return $comments;
    }
1148068
public function getPagerUrl($params = [])
    {
        $urlParams = [];
        $urlParams['_current'] = true;
        $urlParams['_escape'] = true;
        $urlParams['_use_rewrite'] = true;
        $urlParams['_query'] = $params;

        return $this->getUrl('*/*/*', $urlParams);
    }
135046
public function buildUnion($unions, &$params)
    {
        if (empty($unions)) {
            return '';
        }

        $result = '';

        foreach ($unions as $i => $union) {
            $query = $union['query'];

            if ($query instanceof Query) {
                list($unions[$i]['query'], $params) = $this->build($query, $params);
            }

            $result .= $union['type'] . ' ' . ($union['all'] ? 'ALL ' : '') . '( ' . $unions[$i]['query'] . ' ) ';
        }

        return trim($result);
    }
797662
private function buildQueryString(array $params)
    {
        $flattened = [];
        foreach ($params as $key => $value) {
            $flattened[] = $key . '=' . $value;
        }
        $queryString = implode('&', $flattened);

        return $queryString;
    }
325856
public function referer($default = null, $local = false) {
		if ($ref = $this->env('HTTP_REFERER')) {
			if (!$local) {
				return $ref;
			}
			$url = parse_url($ref) + ['path' => ''];
			if (empty($url['host']) || $url['host'] === $this->env('HTTP_HOST')) {
				$ref = $url['path'];
				if (!empty($url['query'])) {
					$ref .= '?' . $url['query'];
				}
				if (!empty($url['fragment'])) {
					$ref .= '#' . $url['fragment'];
				}
				return $ref;
			}
		}
		return ($default !== null) ? $default : '/';
	}
194497
public function urlFor($routeName, array $params = array())
    {
        $storageKey = md5($routeName . serialize($params));
        if (array_key_exists($storageKey, $this->resolvedUrls)) {
            return $this->resolvedUrls[$storageKey];
        }

        if (!array_key_exists($routeName, $this->routes)) {
            $this->resolvedUrls[$storageKey] = $routeName;
            return $routeName;
        }

        $route = $this->isValidRoute($this->routes[$routeName]);
        if (!$route) {
            $this->resolvedUrls[$storageKey] = $routeName;
            return $routeName;
        }

        $path = $route['path'];
        if (empty($params)) {
            $this->resolvedUrls[$storageKey] = $path;
            return $path;
        }

        foreach ($params as $key => $value) {
            if (is_string($value) || is_int($value)) {
                $path = str_replace('{' . $key . '}', $value, $path);
            }
        }

        $this->resolvedUrls[$storageKey] = $path;

        return $path;
    }
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)));
	}
1069791
public function createWebsite(...$params)
    {
        $name      = \array_shift($params);
        $ipAddress = \array_shift($params);
        $https     = \array_shift($params);
        $domains   = \array_shift($params);

        if ($this->version === 1)
        {
            $siteApps = $params;

            return $this->createV1Website($name, $ipAddress, $https, $domains, ...$siteApps);
        }

        $certificate = \array_shift($params);
        $siteApps    = $params;

        return $this->createV2Website($name, $ipAddress, $https, $domains, $certificate, ...$siteApps);

    }
1108854
final protected function generateUrl(string $name, array $params = []) : string
    {
        return $this->urlGenerator
            ->generate($name, $params);
    }
148799
public function buildUrl($method = '', $params = '', $append = true)
    {
        return $this->bbbServerBaseUrl . 'api/' . $method . ($append ? '?' . $this->buildQs($method, $params) : '');
    }
915864
private function queryString($params)
	{
		$querystring = '?';
		foreach($params as $k => $v) {
			$querystring .= $k.'='.urlencode($v).'&';
		}
		return substr($querystring, 0, -1);
	}
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;
    }
772393
public function build($params)
    {
        return ((isset($params['scheme'])) ? $params['scheme'] . '://' : '')
            . ((isset($params['user'])) ? $params['user'] . ((isset($params['pass'])) ? ':' . $params['pass'] : '') . '@' : '')
            . ((isset($params['host'])) ? $params['host'] : '')
            . ((isset($params['port'])) ? ':' . $params['port'] : '')
            . ((isset($params['path'])) ? $params['path'] : '')
            . ((isset($params['query'])) ? '?' . $params['query'] : '')
            . ((isset($params['fragment'])) ? '#' . $params['fragment'] : '');
    }