Return a url based on the $name provided, with $parameters passed (as [key => value]).

@param string $name
@param array  $parameters

@return string
978559
public function getRouteUrlByName($name, array $parameters = [])
    {
        $route = $this->getRouteByName($name);
        if (!$route) {
            return null;
        }
        return $route->buildUrlWithParameters($parameters);
    }
1183576
protected function callMacro($name, $parameters)
    {
        $macro = static::$macros[$name];

        if ($macro instanceof Closure) {
            return call_user_func_array($macro->bindTo($this, static::class), $parameters);
        }

        return call_user_func_array($macro, $parameters);
    }
1073144
private function buildUrl($url, $parameters)
    {
        $prams_former = '?';

        foreach ($parameters as $key => $value) {
            $prams_former = $prams_former.$key.'='.$value.'&';
        }

        return $url.substr($prams_former, 0, -1);
    }
924693
public function staticRef($name, $params = null)
    {
        $name = (string)$name;
        if (!isset($this->static_refs[$name])) {
            try {
                $this->static_refs[$name] = $this->provider->url($name);
            } catch (UnsupportedException $e) {
                $this->static_refs[$name] = '/[static_reference: ' . $name . ']';
            }
        }

        $ret = $this->static_refs[$name];
        if ($params) {
            $ret .= '?' . http_build_query($params, 0, '&');
        }

        return $ret;
    }
368317
public function action($name, ...$parameters)
    {
        $this->link_type = self::LINK_ACTION;
        $this->link_value = [$name, $parameters];
        $this->checkActive();

        return $this;
    }
1270085
public function generate($name, $parameters = array(), $absolute = false)
    {
        $this->urlGenerator = new UrlGenerator($this->routeCollection, $this->context);

        return $this->urlGenerator->generate($name, $parameters, $absolute);
    }
505850
private function getParameterValue(array $parameter, $name, $default = null)
    {
        if (!array_key_exists($name, $parameter)) {
            return $default;
        }

        return $parameter[$name]->getValue();
    }
161022
public static function getPath( $name, $parameters = array(), $relative = false )
    {
        $serviceContainer = ezpKernel::instance()->getServiceContainer();

        return $serviceContainer->get('router')->generate(
            $name,
            $parameters,
            $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH
        );
    }
1343364
public function route($name, $parameters = [], $absolute = true)
    {
        return app('url')->route($this->prefixRoute($name), $parameters, $absolute);
    }
521959
protected function parseUrl($url, $parameters)
    {
        // If provided $url is a route name...
        if ($this->route->has($url)) {
            $url = $this->url->route($url, $parameters);
        } else {
            $url = $this->url->to($url, $parameters);
        }

        return $url;
    }
497025
public function getUri($parameters = [])
    {
        $uri = $this->uri;
        foreach ($parameters as $name => $value) {
            if (!is_numeric($name)) {
                $uri = str_replace(['#'.$name, '::'.$name, ':'.$name], $value, $uri);
                unset($parameters[$name]);
            }
        }
        ksort($parameters);
        foreach ($parameters as $value) {
            $uri = preg_replace('@^([^:#]*)(:|::|#)\w+@', '${1}'.$value, $uri);
        }
        $uri = preg_replace('@\(([^):#]*)\)@', '${1}', $uri);
        $uri = preg_replace('@\([^)]*\)@', '', $uri);
        $uri = preg_replace('@(:|::|#)(\w+)@', '', $uri);
        return $uri;
    }
121525
public function callRoute($name, array $parameters = [], array $options = [])
    {
        try {
            $content = $this->router->dispatchRoute($name, $parameters, $options);
        } catch (\Exception $e) {
            return sprintf('<p style="display:block;boder:1px solid red;" class="error">%s</p>', $e->getMessage());
        }

        return is_string($content) ? $content : '';
    }
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;
    }
458339
protected function generateUrl($name, $parameters = array(), $referenceType = RouterInterface::ABSOLUTE_PATH)
    {
        return $this->router->generate($name, $parameters, $referenceType);
    }
252284
private function implicitReadStringValue(array $parameters, string $name): ?string
    {
        return array_key_exists($name, $parameters) === true && is_string($value = $parameters[$name]) === true ?
            $value : null;
    }
1364974
public static function getUrl( $name, $parameters = array(), $schemeRelative = false )
    {
        $serviceContainer = ezpKernel::instance()->getServiceContainer();

        return $serviceContainer->get('router')->generate(
            $name,
            $parameters,
            $schemeRelative ? UrlGeneratorInterface::NETWORK_PATH : UrlGeneratorInterface::ABSOLUTE_URL
        );
    }
158288
public function repository($name, $method, array $parameters = [])
    {
        return call_user_func_array(
            [ $this->getRepository($name), $method ],
            $parameters
        );
    }