Skip to content
Browse files

route guard registered on route event

  • Loading branch information...
1 parent 058e42c commit f0e0e20938fac84fe2a10e4cf35c2039032fa6a2 @matuszeman matuszeman committed
Showing with 2 additions and 2 deletions.
  1. +1 −1 Module.php
  2. +1 −1 src/ZfcAcl/Guard/Route.php
View
2 Module.php
@@ -19,7 +19,7 @@ public function bootstrap(Manager $moduleManager, Application $app)
if ($this->getOption('enable_guards.route', true)) {
$routeProtector = $locator->get('ZfcAcl\Guard\Route');
- $app->events()->attach('dispatch', array($routeProtector, 'dispatch'), 1000);
+ $app->events()->attach('route', array($routeProtector, 'onRoute'), -1000);
}
if ($this->getOption('enable_guards.event', true)) {
View
2 src/ZfcAcl/Guard/Route.php
@@ -10,7 +10,7 @@ class Route implements Guard {
protected $routeResourceMapMapper;
protected $aclService;
- public function dispatch(MvcEvent $e) {
+ public function onRoute(MvcEvent $e) {
$routeMatch = $e->getRouteMatch();
$routeName = $routeMatch->getMatchedRouteName();

0 comments on commit f0e0e20

Please sign in to comment.
Something went wrong with that request. Please try again.