Просмотр исходного кода

[Routing] simplified RouterInterface

Fabien Potencier 15 лет назад
Родитель
Сommit
f12e5747ae
1 измененных файлов с 4 добавлено и 22 удалено
  1. 4 22
      src/Symfony/Components/Routing/RouterInterface.php

+ 4 - 22
src/Symfony/Components/Routing/RouterInterface.php

@@ -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);
 }