获取url地址
@param string $name 跟在域名后的文本
@param array $params GET参数
@return string
423348
public function getUrl($name, $params = array())
	{
		return static::API_DOMAIN . $name . (empty($params) ? '' : ('?' . $this->http_build_query($params)));
	}
323753
public function param($name)
    {
        $params = $this->params();
        if (isset($params[$name])) {
            return $params[$name];
        } else {
            return null;
        }
    }
1128600
public function get($name, array $params = array())
    {
        if (null === $this->serviceLocator) {
            throw new DomainException('No ServiceLocator defined, use `createServiceWithName` instead of `get`');
        }

        if (self::USE_SL_BEFORE_DI === $this->useServiceLocator && $this->serviceLocator->has($name)) {
            return $this->serviceLocator->get($name);
        }

        try {
            return parent::get($name, $params);
        } catch (ClassNotFoundException $e) {
            if (self::USE_SL_AFTER_DI === $this->useServiceLocator && $this->serviceLocator->has($name)) {
                return $this->serviceLocator->get($name);
            }

            throw new Exception\ServiceNotFoundException(
                sprintf('Service %s was not found in this DI instance', $name),
                null,
                $e
            );
        }
    }
959278
public static function authorizeUrl($params = null)
    {
        if (!$params) {
            $params = array();
        }

        $params['client_id'] = self::_getConnectParam('client_id', $params);
        $params['redirect_uri'] = self::_getConnectParam('redirect_uri', $params);
        if (!array_key_exists('response_type', $params)) {
            $params['response_type'] = 'code';
        }
        $query = Util\Util::urlEncode($params);

        return Sumup::$connectBase . '/authorize?' . $query;
    }
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;
	}
135672
public static function host(array $params = []) : string {
		$protocol = !empty($params['protocol']) ? $params['protocol'] : '';
		$port = !empty($params['port']) ? (':' . $params['port']) : '';
		if (!$protocol) $protocol = self::isSSL() ? 'https' : 'http';
		if (!empty($params['host_parts'])) {
			$host = implode('.', $params['host_parts']);
		} else {
			$host = !empty($params['ip']) ? (getenv('SERVER_ADDR') . ':' . getenv('SERVER_PORT')) : getenv('HTTP_HOST');
		}
		if (!empty($params['level3'])) {
			$host = str_replace('www.', '', $host);
			$host = @$params['level3'] . '.' . $host;
		}
		$result = $protocol . '://' . $host . $port . (!empty($params['request']) ? $_SERVER['REQUEST_URI'] : '/');
		// append mvc
		if (!empty($params['mvc'])) {
			$result = rtrim($result, '/') . $params['mvc'];
		}
		// append parameters
		if (!empty($params['params'])) {
			$result.= '?' . http_build_query2($params['params']);
		}
		return $result;
	}
1369281
protected function getPathParams(array $params = []): string
    {
        if (empty($params)) {
            return '';
        }
        $path = $params['path'] ?? [];
        if (is_string($path)) {
            return $path;
        }
        $path = collect($path)->map(function ($entry) {
            return (string) $entry;
        })->all();
        return implode('/', $path);
    }
979913
protected function getQueryParams(array $params = []): string
    {
        if (empty($params)) {
            return '';
        }
        $query = $params['query'] ?? [];
        if (is_string($query)) {
            return $query;
        }
        return empty($query) ? '' : http_build_query($query);
    }
1174157
public function getMobileUrl($name, $params)
	{
		return static::API_MOBILE_DOMAIN . $name . (empty($params) ? '' : ('?' . $this->http_build_query($params)));
	}
884228
public function get_param($name) {
        if (array_key_exists($name, $this->params)) {
            return $this->params[$name];
        } else {
            return null;
        }
    }
472717
public function getConnection(string $name=null, array $params=[])
  {
    # Find the connection - null if it's not created
    $connection = $this->findConnection($name);

    if (\is_null($connection)) {
      # Create the connection
      $connection = $this->createConnection($name, $params);

      if (!\is_null($connection)) {
        $this->addConnection($connection);
      }
    }

    return $connection;
  }
778963
public function getIndexUrl(array $params = array(), array $options = array())
    {
        return $this->url()->fromRoute($this->getEvent()->getRouteMatch()->getMatchedRouteName(),
            array_merge(array('action' => 'index'), $params),
            $options
        );
    }
441990
public function url($params) {
        $uri = isset($params['uri']) ? $params['uri'] : '';
        $named_params = isset($params['params']) ? $params['params'] : array();
        if ($named_uri = Router::get($uri, $named_params)) {
            $uri = $named_uri;
        }
        return Uri::create($uri);
    }
1234822
public function query($name, $parameters = [])
    {
        if (!isset($parameters['APPID'])) {
            $parameters['APPID'] = $this->apiKey;
        }

        if (!isset($parameters['units'])) {
            $parameters['units'] = $this->units;
        }

        if (!isset($parameters['lang'])) {
            $parameters['lang'] = $this->lang;
        }

        $baseUrl = $this->apiUrl.$name;

        $requestQueryParts = [];
        foreach ($parameters as $key => $value) {
            $requestQueryParts[] = $key.'='.rawurlencode($value);
        }
        $baseUrl .= '?'.implode('&', $requestQueryParts);

        $response = $this->guzzleClient->get($baseUrl);
        $response = json_decode($response->getBody()->getContents());

        return $response;
    }
236302
protected function generatePath($name, $params = []) {
		$result = '';
		$compiledRoute = $this->getCompiledRoute($name);

		if (is_string($compiledRoute)) {
			$result = $compiledRoute;
		} else if (is_array($compiledRoute)) {
			$chunks = $compiledRoute['chunks'];
			foreach ($params as $paramName => $value) {
				if (isset($compiledRoute['params'][$paramName])) {
					$index = $compiledRoute['params'][$paramName];
					$chunks[$index] = $value;
				}
			}
			$result = implode($chunks);
		}

		return $result;
	}
634280
public function create($name, $params = [ ])
    {
        if ($name !== null) {
            $name = $this->getName($name);
        } else {
            $name = $this->_base;
        }

        if (!isset($params['rule'])) {
            $params['rule'] = $this->_rule;
        }

        if (!isset($params['class'])) {
            $params['class'] = $this->_class;
        }

        return $this->link($name, $params);
    }
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;
	}