Change DispatcherAware to accept concrete instances

Dispatcher is already instanciated when invoking controller. So useless to lazy load it.
This commit is contained in:
Benoît Burnichon
2015-05-14 19:27:58 +02:00
parent 55190dffd0
commit e25cd4097c
11 changed files with 15 additions and 44 deletions

View File

@@ -26,9 +26,7 @@ class TaskManager implements ControllerProviderInterface, ServiceProviderInterfa
{
$app['controller.admin.task'] = $app->share(function (\Alchemy\Phrasea\Application $app) {
return (new TaskManagerController($app))
->setDispatcherLocator(function () use ($app) {
return $app['dispatcher'];
});
->setDispatcher($app['dispatcher']);
});
}