You are here

public function DynamicRouter::generate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony-cmf/routing/DynamicRouter.php \Symfony\Cmf\Component\Routing\DynamicRouter::generate()

Generates a URL from the given parameters.

If the generator is not able to generate the url, it must throw the RouteNotFoundException as documented below.

@api

Parameters

string $name The name of the route:

mixed $parameters An array of parameters:

Boolean $absolute Whether to generate an absolute URL:

Return value

string The generated URL

Throws

RouteNotFoundException if route doesn't exist

Overrides UrlGeneratorInterface::generate

File

vendor/symfony-cmf/routing/DynamicRouter.php, line 167

Class

DynamicRouter
A flexible router accepting matcher and generator through injection and using the RouteEnhancer concept to generate additional data on the routes.

Namespace

Symfony\Cmf\Component\Routing

Code

public function generate($name, $parameters = array(), $absolute = false) {
  return $this
    ->getGenerator()
    ->generate($name, $parameters, $absolute);
}