3 namespace Drupal\Core\Routing;
5 use Symfony\Component\HttpFoundation\Request;
8 * Defines an interface for a stack of route matches.
10 * This could be for example used on exception pages.
12 interface StackedRouteMatchInterface extends RouteMatchInterface {
15 * Gets the current route match.
17 * @return \Drupal\Core\Routing\RouteMatchInterface
19 public function getCurrentRouteMatch();
22 * Gets the master route match..
24 * @return \Drupal\Core\Routing\RouteMatchInterface
26 public function getMasterRouteMatch();
29 * Returns the parent route match of the current.
31 * @return \Drupal\Core\Routing\RouteMatchInterface|null
32 * The parent route match or NULL, if it the master route match.
34 public function getParentRouteMatch();
37 * Returns a route match from a given request, if possible.
39 * @param \Symfony\Component\HttpFoundation\Request $request
42 * @return \Drupal\Core\Routing\RouteMatchInterface|null
43 * THe matching route match, or NULL if there is no matching one.
45 public function getRouteMatchFromRequest(Request $request);