You are here

protected function DynamicRouter::sortRouteEnhancers in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony-cmf/routing/DynamicRouter.php \Symfony\Cmf\Component\Routing\DynamicRouter::sortRouteEnhancers()

Sort enhancers by priority.

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

Return value

RouteEnhancerInterface[] the sorted enhancers

1 call to DynamicRouter::sortRouteEnhancers()
DynamicRouter::getRouteEnhancers in vendor/symfony-cmf/routing/DynamicRouter.php
Sorts the enhancers and flattens them.

File

vendor/symfony-cmf/routing/DynamicRouter.php, line 324

Class

DynamicRouter
A flexible router accepting matcher and generator through injection and using the RouteEnhancer concept to generate additional data on the routes.

Namespace

Symfony\Cmf\Component\Routing

Code

protected function sortRouteEnhancers() {
  $sortedEnhancers = array();
  krsort($this->enhancers);
  foreach ($this->enhancers as $enhancers) {
    $sortedEnhancers = array_merge($sortedEnhancers, $enhancers);
  }
  return $sortedEnhancers;
}