interface 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

1 file declares its use of RouteFilterInterface
MimeTypeMatcher.php in drupal/core/lib/Drupal/Core/Routing/MimeTypeMatcher.php
Contains Drupal\Core\Routing\MimeTypeMatcher.

File

drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/NestedMatcher/RouteFilterInterface.php, line 20

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. 1