protected function NestedMatcher::sortMatchers

Sort matchers by priority.

The highest priority number is the highest priority (reverse sorting).

Return value

\Symfony\Component\Routing\RequestMatcherInterface[] An array of Matcher objects in the order they should be used.

1 call to NestedMatcher::sortMatchers()
NestedMatcher::getPartialMatchers in drupal/core/lib/Drupal/Core/Routing/NestedMatcher.php
Sorts the matchers and flattens them.

File

drupal/core/lib/Drupal/Core/Routing/NestedMatcher.php, line 164
Definition of Drupal\Core\Routing\NestedMatcher.

Class

NestedMatcher
The nested matcher layers multiple partial matchers together.

Namespace

Drupal\Core\Routing

Code

protected function sortMatchers() {
  $sortedMatchers = array();
  krsort($this->matchers);
  foreach ($this->matchers as $matchers) {
    $sortedMatchers = array_merge($sortedMatchers, $matchers);
  }
  return $sortedMatchers;
}