Version 1
[yaffs-website] / web / core / lib / Drupal / Core / Routing / RouteProviderInterface.php
1 <?php
2
3 namespace Drupal\Core\Routing;
4
5 use Symfony\Cmf\Component\Routing\RouteProviderInterface as RouteProviderBaseInterface;
6
7 /**
8  * Extends the router provider interface
9  *
10  * @see \Symfony\Cmf\Component\Routing
11  */
12 interface RouteProviderInterface extends RouteProviderBaseInterface {
13
14   /**
15    * Get all routes which match a certain pattern.
16    *
17    * @param string $pattern
18    *   The route pattern to search for (contains {} as placeholders).
19    *
20    * @return \Symfony\Component\Routing\RouteCollection
21    *   Returns a route collection of matching routes. The collection may be
22    *   empty and will be sorted from highest to lowest fit (match of path parts)
23    *   and then in ascending order by route name for routes with the same fit.
24    */
25   public function getRoutesByPattern($pattern);
26
27   /**
28    * Returns all the routes on the system.
29    *
30    * Usage of this method is discouraged for performance reasons. If possible,
31    * use RouteProviderInterface::getRoutesByNames() or
32    * RouteProviderInterface::getRoutesByPattern() instead.
33    *
34    * @return \Symfony\Component\Routing\Route[]
35    *   An iterator of routes keyed by route name.
36    */
37   public function getAllRoutes();
38
39   /**
40    * Resets the route provider object.
41    */
42   public function reset();
43
44 }