move app/plugins to app/listeners and give them the App\Listener namespace.
This commit is contained in:
parent
a72932a7ad
commit
6ed63d591f
5 changed files with 17 additions and 15 deletions
|
|
@ -29,6 +29,9 @@ use Httpcb\Auth,
|
|||
Httpcb\Navigation,
|
||||
Httpcb\Menu;
|
||||
|
||||
use App\Listener\AclListener,
|
||||
App\Listener\DispatchListener;
|
||||
|
||||
/**
|
||||
* The FactoryDefault Dependency Injector automatically register the right services providing a full stack framework
|
||||
*/
|
||||
|
|
@ -54,10 +57,10 @@ $di->setShared('dispatcher', function() use ($di, $config) {
|
|||
});
|
||||
|
||||
if ($config->application->debug == false) {
|
||||
$eventsManager->attach('dispatch:beforeException', new \ExceptionHandlerPlugin());
|
||||
$eventsManager->attach('dispatch:beforeException', new DispatchListener());
|
||||
}
|
||||
|
||||
$eventsManager->attach('dispatch:beforeExecuteRoute', new \AclPlugin());
|
||||
$eventsManager->attach('dispatch:beforeExecuteRoute', new AclListener());
|
||||
|
||||
$dispatcher = new \Phalcon\Mvc\Dispatcher();
|
||||
$dispatcher->setEventsManager($eventsManager);
|
||||
|
|
|
|||
Reference in a new issue