2015-01-16 14:23:05 +01:00
|
|
|
<?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;
|
2015-02-25 17:29:06 +01:00
|
|
|
use Subscriber\SubtaskTimesheetSubscriber;
|
|
|
|
use Subscriber\TaskMovedDateSubscriber;
|
2015-01-16 14:23:05 +01:00
|
|
|
|
|
|
|
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));
|
2015-02-25 17:29:06 +01:00
|
|
|
$container['dispatcher']->addSubscriber(new SubtaskTimesheetSubscriber($container));
|
|
|
|
$container['dispatcher']->addSubscriber(new TaskMovedDateSubscriber($container));
|
2015-01-16 14:23:05 +01:00
|
|
|
|
|
|
|
// Automatic actions
|
|
|
|
$container['action']->attachEvents();
|
|
|
|
}
|
|
|
|
}
|