protected function ChainRouter::sortRouters

Sort routers by priority. The highest priority number is the highest priority (reverse sorting)

Return value

RouterInterface[]

1 call to ChainRouter::sortRouters()
ChainRouter::all in drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ChainRouter.php
Sorts the routers and flattens them.

File

drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ChainRouter.php, line 116

Class

ChainRouter
ChainRouter

Namespace

Symfony\Cmf\Component\Routing

Code

protected function sortRouters() {
  $sortedRouters = array();
  krsort($this->routers);
  foreach ($this->routers as $routers) {
    $sortedRouters = array_merge($sortedRouters, $routers);
  }
  return $sortedRouters;
}