3 namespace Drupal\Core\Routing;
5 use Symfony\Cmf\Component\Routing\RouteProviderInterface as RouteProviderBaseInterface;
8 * Extends the router provider interface
10 * @see \Symfony\Cmf\Component\Routing
12 interface RouteProviderInterface extends RouteProviderBaseInterface {
15 * Get all routes which match a certain pattern.
17 * @param string $pattern
18 * The route pattern to search for (contains {} as placeholders).
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.
25 public function getRoutesByPattern($pattern);
28 * Returns all the routes on the system.
30 * Usage of this method is discouraged for performance reasons. If possible,
31 * use RouteProviderInterface::getRoutesByNames() or
32 * RouteProviderInterface::getRoutesByPattern() instead.
34 * @return \Symfony\Component\Routing\Route[]
35 * An iterator of routes keyed by route name.
37 public function getAllRoutes();
40 * Resets the route provider object.
42 public function reset();