45b777cfaed636c9a33a225930791bc18fcc476c
[yaffs-website] / web / core / lib / Drupal / Core / Routing / StackedRouteMatchInterface.php
1 <?php
2
3 namespace Drupal\Core\Routing;
4
5 use Symfony\Component\HttpFoundation\Request;
6
7 /**
8  * Defines an interface for a stack of route matches.
9  *
10  * This could be for example used on exception pages.
11  */
12 interface StackedRouteMatchInterface extends RouteMatchInterface {
13
14   /**
15    * Gets the current route match.
16    *
17    * @return \Drupal\Core\Routing\RouteMatchInterface
18    */
19   public function getCurrentRouteMatch();
20
21   /**
22    * Gets the master route match..
23    *
24    * @return \Drupal\Core\Routing\RouteMatchInterface
25    */
26   public function getMasterRouteMatch();
27
28   /**
29    * Returns the parent route match of the current.
30    *
31    * @return \Drupal\Core\Routing\RouteMatchInterface|null
32    *   The parent route match or NULL, if it the master route match.
33    */
34   public function getParentRouteMatch();
35
36   /**
37    * Returns a route match from a given request, if possible.
38    *
39    * @param \Symfony\Component\HttpFoundation\Request $request
40    *   The request.
41    *
42    * @return \Drupal\Core\Routing\RouteMatchInterface|null
43    *   THe matching route match, or NULL if there is no matching one.
44    */
45   public function getRouteMatchFromRequest(Request $request);
46
47 }