public function DynamicRouter::addRouteEnhancer in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony-cmf/routing/DynamicRouter.php \Symfony\Cmf\Component\Routing\DynamicRouter::addRouteEnhancer()
Add route enhancers to the router to let them generate information on matched routes.
The order of the enhancers is determined by the priority, the higher the value, the earlier the enhancer is run.
Parameters
RouteEnhancerInterface $enhancer:
int $priority:
File
- vendor/
symfony-cmf/ routing/ DynamicRouter.php, line 291
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\RoutingCode
public function addRouteEnhancer(RouteEnhancerInterface $enhancer, $priority = 0) {
if (empty($this->enhancers[$priority])) {
$this->enhancers[$priority] = array();
}
$this->enhancers[$priority][] = $enhancer;
$this->sortedEnhancers = array();
return $this;
}