<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Routing\Generator;
use Symfony\Component\Routing\RequestContextAwareInterface;
use Symfony\Component\Routing\Exception\RouteNotFoundException;
/**
* UrlGeneratorInterface is the interface that all URL generator classes must implement.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
interface UrlGeneratorInterface extends RequestContextAwareInterface {
/**
* 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.
*
* @param string $name The name of the route
* @param mixed $parameters An array of parameters
* @param Boolean $absolute Whether to generate an absolute URL
*
* @return string The generated URL
*
* @throws RouteNotFoundException if route doesn't exist
*
* @api
*/
public function generate($name, $parameters = array(), $absolute = false);
}
Name | Description |
---|---|
UrlGeneratorInterface | UrlGeneratorInterface is the interface that all URL generator classes must implement. |