Builds the final url and merges saved params with given via parameter.

@param array $params The additional GET params.

@return string
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;
	}
802040
public function buildUrlWithParameters(array $parameters = [])
    {
        $url = $this->url;

        if (!$this->hasParameters() && !$parameters) {
            return $url;
        }

        foreach ($parameters as $key => $value) {
            $url = str_replace('{' . $key . '}', $value, $url);
        }
        return $url;
    }
148799
public function buildUrl($method = '', $params = '', $append = true)
    {
        return $this->bbbServerBaseUrl . 'api/' . $method . ($append ? '?' . $this->buildQs($method, $params) : '');
    }
5551
private function decorateParamsForMethodCall(array $params) : string
    {
        $params_out = [];
        foreach($params as $param) {
            $params_out[] = $this->decorateValue($param);
        }
        return implode(',',$params_out);
    }
498004
public function url($params = array())
	{
		if ($this->isStatic())
		{
			return $this->pattern;
		}

		$url = $this->pattern;

		foreach ($this->getSegments($url) as $segment)
		{
			$func = $segment['optional'] === true ? 'replaceOptional' : 'replaceRequired';
			$url = $this->{$func}($url, $segment['name'], $segment['token'], $params);
		}

		return $url;
	}
1055666
private function _get_args_from_params(array $params)
	{
		$byType	=	$this->container->requestRouteParams;
		$args	=	[];
		foreach ($params as $param)
		{
			if ($param->hasType() && isset($byType[$type = strtolower($param->getType())]))
				$args[] = $byType[$type];
			else if (isset($this->params[$param->name]))
				$args[] = $this->params[$param->name];
			else if (isset($_GET[$param->name]))
				$args[] = $_GET[$param->name];
			else if (isset($_POST[$param->name]))
				$args[] = $_POST[$param->name];
			else
			{
				if ( ! $param->isOptional())
					throw new \Exception('Unable to find NON-optional parameter `' . $param->name . ($param->hasType() ? '` of type `' . $param->getType() : null) . '` for route controller/handler: ' . var_export($this->route, true));
				$args[] = $param->getDefaultValue();
			}
		}
		return $args;
	}
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;
	}
895515
public function download(array $params = [])
    {
        $path = $this->buildDiffPath();

        return $this->pureGet($path, $params, ['Accept' => 'text/plain'])->getBody();
    }
577834
private function buildUrlParams(
        string $url,
        array $params
    ) {
        array_walk($params, function (&$value, $key) {
            $value = "$key=$value";
        });

        return $url.'?'.implode('&', $params);
    }
655533
private function constructPdoDsn(array $params)
    {
        $dsn = self::NAME . ':';
        if (isset($params['host']) && $params['host'] != '') {
            $dsn .= $params['host'];
        } else {
            $dsn .= 'localhost';
        }
        $dsn .= ':' . (isset($params['port']) ? $params['port'] : '4200');

        return $dsn;
    }
955385
protected static function formatParams($params)
    {
        $reslt = '';
        //
        for ($i = 0; $i < count($params); $i++) {
            $reslt .= '$'.$params[$i];
            if ($i < count($params) - 1) {
                $reslt .= ',';
            }
        }

        return $reslt;
    }
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;
    }
979255
public static function encodeParameters($params)
    {
        $flattenedParams = self::flattenParams($params);
        $pieces = [];
        foreach ($flattenedParams as $param) {
            list($k, $v) = $param;
            array_push($pieces, self::urlEncode($k) . '=' . self::urlEncode($v));
        }
        return implode('&', $pieces);
    }
1329121
protected function mergeShared(array $params)
    {
        $proxy = $this->getProxy();

        return array_merge($this->globals, $params, ['view' => $proxy, 'func' => [$this, 'func']]);
    }
1027899
protected function _params2string($params)
    {
        if (!count($params)) {
            return '';
        }
        $paramsPart = array();
        foreach ($params as $name => $value) {
            if (!$value && ('0' !== $value)) {
                continue;
            }
            $paramsPart[] = str_replace(array('{name}', '{value}'), array($name, urlencode($value)), $this->paramsPairStructure);
        }
        if (!count($paramsPart)) {
            return '';
        }
        return '/' . implode($this->paramsSeparator, $paramsPart);
    }
160066
protected function serializeParams(array $params)
    {
        $serialized = array();
        foreach ($params as $param) {
            $serialized[] = $this->serializer->serialize($param);
        }

        return $serialized;
    }
163082
public function getLogoutUrl($params=array()) {
    return $this->getUrl(
      'www',
      'logout.php',
      array_merge(array(
        'next'         => $this->getCurrentUrl(),
        'access_token' => $this->getAccessToken(),
      ), $params)
    );
  }