abstract class PartialMatcher

Utility base class for partial matchers.

Hierarchy

Expanded class hierarchy of PartialMatcher

File

drupal/core/lib/Drupal/Core/Routing/PartialMatcher.php, line 16
Definition of Drupal\Core\Routing\PartialMatcher.

Namespace

Drupal\Core\Routing
View source
abstract class PartialMatcher implements PartialMatcherInterface {

  /**
   * The RouteCollection this matcher should match against.
   *
   * @var \Symfony\Component\Routing\RouteCollection
   */
  protected $routes;

  /**
   * Sets the route collection this matcher should use.
   *
   * @param \Symfony\Component\Routing\RouteCollection $collection
   *   The collection against which to match.
   *
   * @return \Drupal\Core\Routing\PartialMatcherInterface
   *   The current matcher.
   */
  public function setCollection(RouteCollection $collection) {
    $this->routes = $collection;
    return $this;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PartialMatcher::$routes protected property The RouteCollection this matcher should match against.
PartialMatcher::setCollection public function Sets the route collection this matcher should use. Overrides PartialMatcherInterface::setCollection
PartialMatcherInterface::matchRequestPartial public function Matches a request against multiple routes. 2