Refactor LazaretController

This commit is contained in:
Benoît Burnichon
2015-05-15 00:08:36 +02:00
parent b19083096b
commit ad766a3eaf
4 changed files with 222 additions and 114 deletions

View File

@@ -25,7 +25,17 @@ class Lazaret implements ControllerProviderInterface, ServiceProviderInterface
public function register(Application $app)
{
$app['controller.prod.lazaret'] = $app->share(function (PhraseaApplication $app) {
return (new LazaretController($app));
return (new LazaretController($app))
->setDataboxLoggerLocator($app['phraseanet.logger'])
->setDelivererLocator(function () use ($app) {
return $app['phraseanet.file-serve'];
})
->setEntityManagerLocator(function () use ($app) {
return $app['orm.em'];
})
->setFileSystemLocator(function () use ($app) {
return $app['filesystem'];
});
});
}