-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathEventBandBundle.php
35 lines (31 loc) · 1.25 KB
/
EventBandBundle.php
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
<?php
/*
* Copyright (c)
* Kirill chEbba Chebunin <iam@chebba.org>
*
* This source file is subject to the MIT license that is bundled
* with this package in the file LICENSE.
*/
namespace EventBand\Bundle;
use EventBand\Bundle\DependencyInjection\Compiler\JmsEventConfigPass;
use EventBand\Bundle\DependencyInjection\Compiler\ReplaceDispatcherPass;
use EventBand\Bundle\DependencyInjection\Compiler\SubscribeKernelListenerPass;
use EventBand\Bundle\DependencyInjection\Compiler\SubscribePass;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* EventBandBundle main bundle class
*
* @author Kirill chEbba Chebunin <iam@chebba.org>
* @license http://opensource.org/licenses/mit-license.php MIT
*/
class EventBandBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
$container->addCompilerPass(new SubscribeKernelListenerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION); // RegisterKernelListenersPass is registered on "BEFORE_REMOVING" since 2.3
$container->addCompilerPass(new SubscribePass(), PassConfig::TYPE_AFTER_REMOVING);
$container->addCompilerPass(new JmsEventConfigPass());
}
}