Adds a partial matcher to the matching plan.
Partial matchers will be run in the order in which they are added.
\Drupal\Core\Routing\PartialMatcherInterface $matcher: A partial matcher.
int $priority: (optional) The priority of the matcher. Higher number matchers will be checked first. Default to 0.
NestedMatcherInterface The current matcher.
Overrides NestedMatcherInterface::addPartialMatcher
public function addPartialMatcher(PartialMatcherInterface $matcher, $priority = 0) {
if (empty($this->matchers[$priority])) {
$this->matchers[$priority] = array();
}
$this->matchers[$priority][] = $matcher;
$this->sortedMatchers = array();
}