1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Copyright 2014 Underground Elephant |
5
|
|
|
* |
6
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
7
|
|
|
* you may not use this file except in compliance with the License. |
8
|
|
|
* You may obtain a copy of the License at |
9
|
|
|
* |
10
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0 |
11
|
|
|
* |
12
|
|
|
* Unless required by applicable law or agreed to in writing, software |
13
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, |
14
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
15
|
|
|
* See the License for the specific language governing permissions and |
16
|
|
|
* limitations under the License. |
17
|
|
|
* |
18
|
|
|
* @package qpush-bundle |
19
|
|
|
* @copyright Underground Elephant 2014 |
20
|
|
|
* @license Apache License, Version 2.0 |
21
|
|
|
*/ |
22
|
|
|
|
23
|
|
|
namespace Uecode\Bundle\QPushBundle; |
24
|
|
|
|
25
|
|
|
use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass; |
26
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle; |
27
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
28
|
|
|
use Uecode\Bundle\QPushBundle\DependencyInjection\UecodeQPushExtension; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @author Keith Kirk <[email protected]> |
32
|
|
|
*/ |
33
|
|
|
class UecodeQPushBundle extends Bundle |
34
|
|
|
{ |
35
|
|
|
/** |
36
|
|
|
* {@inlineDoc} |
37
|
|
|
*/ |
38
|
|
|
public function __construct() |
39
|
|
|
{ |
40
|
|
|
// Setting extension to bypass alias convention check |
41
|
|
|
$this->extension = new UecodeQPushExtension(); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Adds the Compiler Passes for the QPushBundle |
46
|
|
|
* |
47
|
|
|
* @param ContainerBuilder $container |
48
|
|
|
*/ |
49
|
|
|
public function build(ContainerBuilder $container) |
50
|
|
|
{ |
51
|
|
|
parent::build($container); |
52
|
|
|
|
53
|
|
|
$container->addCompilerPass( |
54
|
|
|
new RegisterListenersPass( |
55
|
|
|
'event_dispatcher', |
56
|
|
|
'uecode_qpush.event_listener', |
57
|
|
|
'uecode_qpush.event_subscriber' |
58
|
|
|
) |
59
|
|
|
); |
60
|
|
|
} |
61
|
|
|
} |
62
|
|
|
|