You are here

interface RouteFilterInterface in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony-cmf/routing/NestedMatcher/RouteFilterInterface.php \Symfony\Cmf\Component\Routing\NestedMatcher\RouteFilterInterface
  2. 8 core/lib/Drupal/Core/Routing/RouteFilterInterface.php \Drupal\Core\Routing\RouteFilterInterface
Same name and namespace in other branches
  1. 8.0 vendor/symfony-cmf/routing/NestedMatcher/RouteFilterInterface.php \Symfony\Cmf\Component\Routing\NestedMatcher\RouteFilterInterface

A RouteFilter takes a RouteCollection and returns a filtered subset.

It is not implemented as a filter iterator because we want to allow router filters to handle their own empty-case handling, usually by throwing an appropriate exception if no routes match the object's rules.

@author Larry Garfield @author David Buchmann

Hierarchy

Expanded class hierarchy of RouteFilterInterface

All classes that implement RouteFilterInterface

2 files declare their use of RouteFilterInterface
LazyRouteFilter.php in core/lib/Drupal/Core/Routing/LazyRouteFilter.php
Contains \Drupal\Core\Routing\LazyRouteFilter.
RouteFilterInterface.php in core/lib/Drupal/Core/Routing/RouteFilterInterface.php
Contains \Drupal\Core\Routing\RouteFilterInterface.

File

vendor/symfony-cmf/routing/NestedMatcher/RouteFilterInterface.php, line 29

Namespace

Symfony\Cmf\Component\Routing\NestedMatcher
View source
interface RouteFilterInterface {

  /**
   * Filters the route collection against a request and returns all matching
   * routes.
   *
   * @param RouteCollection $collection The collection against which to match.
   * @param Request         $request    A Request object against which to match.
   *
   * @return RouteCollection A non-empty RouteCollection of matched routes.
   *
   * @throws ResourceNotFoundException if none of the routes in $collection
   *                                   matches $request. This is a performance
   *                                   optimization to not continue the match
   *                                   process when a match will no longer be
   *                                   possible.
   */
  public function filter(RouteCollection $collection, Request $request);

}

Members

Namesort descending Modifiers Type Description Overrides
RouteFilterInterface::filter public function Filters the route collection against a request and returns all matching routes. 4