[Routing] simplified RouterInterface
This commit is contained in:
parent
e35d345204
commit
f12e5747ae
@ -2,6 +2,9 @@
|
||||
|
||||
namespace Symfony\Components\Routing;
|
||||
|
||||
use Symfony\Components\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Components\Routing\Matcher\UrlMatcherInterface;
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony framework.
|
||||
*
|
||||
@ -20,27 +23,6 @@ namespace Symfony\Components\Routing;
|
||||
* @subpackage Components_Routing
|
||||
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
|
||||
*/
|
||||
interface RouterInterface
|
||||
interface RouterInterface extends UrlMatcherInterface, UrlGeneratorInterface
|
||||
{
|
||||
/**
|
||||
* Tries to match a URL with a set of routes.
|
||||
*
|
||||
* Returns false if no route matches the URL.
|
||||
*
|
||||
* @param string $url URL to be parsed
|
||||
*
|
||||
* @return array|false An array of parameters or false if no route matches
|
||||
*/
|
||||
public function match($url);
|
||||
|
||||
/**
|
||||
* Generates a URL from the given parameters.
|
||||
*
|
||||
* @param string $name The name of the route
|
||||
* @param array $parameters An array of parameters
|
||||
* @param Boolean $absolute Whether to generate an absolute URL
|
||||
*
|
||||
* @return string The generated URL
|
||||
*/
|
||||
public function generate($name, array $parameters, $absolute = false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user