protected function ChainMatcher::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 ChainMatcher::sortMatchers()
ChainMatcher::all in drupal/core/lib/Drupal/Core/Routing/ChainMatcher.php
Sorts the matchers and flattens them.

File

drupal/core/lib/Drupal/Core/Routing/ChainMatcher.php, line 154
Definition of Drupal\Core\Routing\ChainMatcher.

Class

ChainMatcher
Aggregates multiple matchers together in series.

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;
}