Generate an absolute URL to the route.

@param $name
@param array $parameters
@return string
@throws \Exception
337068
public function route($name, $parameters = [])
    {
        $route = router()->route($name);
        if (is_null($route)) {
            throw new \Exception("Route name [$name] not found");
        }

        $route_url = $route->url($parameters);

        return $this->to($route_url);
    }
1102556
public function build(Route $route, $name, array $parameters = [])
    {
        $url      = $this->app['url_generator']->generate($name, $parameters, UrlGeneratorInterface::ABSOLUTE_URL);
        $request  = Request::create($url, 'GET', array_merge(['_format' => $route->getFormat()], $parameters));
        $response = $this->app->handle($request);

        $this->write(
            $this->getFilePath($route, $parameters),
            $response->getContent(),
            $request->getFormat($response->headers->get('Content-Type')),
            $route->getFileName()
        );
    }
1190260
public function url(string $name, array $params = []): string
    {
        return $this->core->router->generate($name, $params);
    }
522775
public function path($route, $parameters = [])
    {
        return $this->application['url_generator']->generate($route, $parameters, UrlGeneratorInterface::ABSOLUTE_PATH);
    }
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
        );
    }
1279140
public function getUrl($name, $parameters = array(), $relative = false)
	{
		return $this->urlGenerator->getRouteUrl($name, $parameters, $relative);
	}
978559
public function getRouteUrlByName($name, array $parameters = [])
    {
        $route = $this->getRouteByName($name);
        if (!$route) {
            return null;
        }
        return $route->buildUrlWithParameters($parameters);
    }
1108854
final protected function generateUrl(string $name, array $params = []) : string
    {
        return $this->urlGenerator
            ->generate($name, $params);
    }
387823
public function getNewsIndexPermalink(array $parameters = [], $absolute = 1)
    {
        return $this->getContainer()->get('router')->generate($this->getNewsIndexRoute(), $this->getNewsIndexRouteParameters($parameters), $absolute);
    }
1049904
public function routeModel( $name, $model, $parameters = [], $absolute = true )
	{
		if ( !$model instanceof RoutableModel )
			throw new UrlGenerationException( "The model [" . get_class( $model ) . "] must implement the RoutableModel interface." );

		if ( !is_null( $route = $this->routes->getByName( $name ) ) )
		{
			$appendedUrl = "";

			if ( is_array( $p = $model->appendRoute( $name, $parameters, $appendedUrl ) ) )
				$parameters = array_merge( $parameters, $p );

			return $this->toRoute( $route, $parameters, $absolute ) . $appendedUrl;
		}

		throw new RouteNotFoundException( "Route [{$name}] not found." );
	}
641308
public function to($name, array $args = [])
    {
        $route = $this->collector->findNamedRoute($name);
        $parser = $this->collector->getParser();
        $pattern = $route->getPattern();

        preg_match_all("~" . $parser::DYNAMIC_REGEX . "~x", $pattern, $matches, PREG_SET_ORDER);

        foreach ((array) $matches as $key => $match) {
            if (!isset($args[$match[1]])) {
                throw new \BadMethodCallException("Missing argument '{$match[1]}' on creation of link for '{$name}' route.");
            }

            $pattern = str_replace($match[0], $args[$match[1]], $pattern);
        }

        return $pattern;
    }
444271
public function getPath($name, array $parameters = array())
    {
        return $this->container->get('router.url_generator')->generate($name, $parameters, false);
    }
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;
	}
1077799
public static function path($name, $parameters = [], $absolute = false) {
		return self::getRouteByName ( $name, $parameters, $absolute );
	}
1223611
public function generateUrl($route, array $parameters = array(), $absolute = false)
    {
        return $this->getContainer()->get('router')->generate($route, $parameters, $absolute);
    }
67458
public function getFaqIndexPermalink(array $parameters = [], $absolute = 1)
    {
        return $this->getContainer()->get('router')->generate($this->getFaqIndexRoute(), $this->getFaqIndexRouteParameters($parameters), $absolute);
    }
280055
public function url($route, $parameters = array())
    {
        return $this->urlGenerator->generate($route, $parameters, UrlGeneratorInterface::ABSOLUTE_URL);
    }