Add LazyLocator

This commit is contained in:
Benoît Burnichon
2015-06-02 14:42:00 +02:00
parent fe057a8a6b
commit 7be5e332db
26 changed files with 117 additions and 126 deletions

View File

@@ -11,6 +11,7 @@
namespace Alchemy\Phrasea\Core\Provider;
use Alchemy\Phrasea\Controller\LazyLocator;
use Alchemy\Phrasea\TaskManager\Job\FtpJob;
use Alchemy\Phrasea\TaskManager\Job\ArchiveJob;
use Alchemy\Phrasea\TaskManager\Job\BridgeJob;
@@ -75,9 +76,8 @@ class TasksServiceProvider implements ServiceProviderInterface
return [
(new FtpJob($app['translator'], $app['dispatcher'], $logger))
->setDelivererLocator(function () use ($app) {
return $app['notification.deliverer'];
}),
->setDelivererLocator(new LazyLocator($app, 'notification.deliverer'))
,
new ArchiveJob($app['translator'], $app['dispatcher'], $logger),
new IndexerJob($app['translator'], $app['dispatcher'], $logger),
new BridgeJob($app['translator'], $app['dispatcher'], $logger),