blob: ec3822065d0d412c9e6cb4a3f54f3ac1f5c91b71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php
namespace ServiceProvider;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Subscriber\AuthSubscriber;
use Subscriber\BootstrapSubscriber;
use Subscriber\NotificationSubscriber;
use Subscriber\ProjectActivitySubscriber;
use Subscriber\ProjectDailySummarySubscriber;
use Subscriber\ProjectModificationDateSubscriber;
use Subscriber\WebhookSubscriber;
use Subscriber\SubtaskTimesheetSubscriber;
use Subscriber\TaskMovedDateSubscriber;
class EventDispatcherProvider implements ServiceProviderInterface
{
public function register(Container $container)
{
$container['dispatcher'] = new EventDispatcher;
$container['dispatcher']->addSubscriber(new BootstrapSubscriber($container));
$container['dispatcher']->addSubscriber(new AuthSubscriber($container));
$container['dispatcher']->addSubscriber(new ProjectActivitySubscriber($container));
$container['dispatcher']->addSubscriber(new ProjectDailySummarySubscriber($container));
$container['dispatcher']->addSubscriber(new ProjectModificationDateSubscriber($container));
$container['dispatcher']->addSubscriber(new WebhookSubscriber($container));
$container['dispatcher']->addSubscriber(new NotificationSubscriber($container));
$container['dispatcher']->addSubscriber(new SubtaskTimesheetSubscriber($container));
$container['dispatcher']->addSubscriber(new TaskMovedDateSubscriber($container));
// Automatic actions
$container['action']->attachEvents();
}
}
|