|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Innmind\RestBundle; |
|
4
|
|
|
|
|
5
|
|
|
use Innmind\RestBundle\DependencyInjection\Compiler\RegisterClientDecodersPass; |
|
6
|
|
|
use Innmind\Rest\Server\DependencyInjection\Compiler\RegisterFormatPass; |
|
7
|
|
|
use Innmind\Rest\Server\DependencyInjection\Compiler\RegisterStoragePass; |
|
8
|
|
|
use Innmind\Rest\Server\DependencyInjection\Compiler\RegisterDefinitionCompilerPass; |
|
9
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle; |
|
10
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
11
|
|
|
|
|
12
|
|
|
class InnmindRestBundle extends Bundle |
|
13
|
|
|
{ |
|
14
|
|
|
/** |
|
15
|
|
|
* {@inheritdoc} |
|
16
|
|
|
*/ |
|
17
|
2 |
|
public function build(ContainerBuilder $container) |
|
18
|
|
|
{ |
|
19
|
2 |
|
parent::build($container); |
|
20
|
|
|
|
|
21
|
|
|
$container |
|
22
|
2 |
|
->addCompilerPass(new RegisterClientDecodersPass) |
|
23
|
2 |
|
->addCompilerPass(new RegisterFormatPass( |
|
24
|
2 |
|
'innmind_rest.server.formats', |
|
25
|
|
|
'innmind_rest.server.format' |
|
26
|
2 |
|
)) |
|
27
|
2 |
|
->addCompilerPass(new RegisterStoragePass( |
|
28
|
2 |
|
'innmind_rest.server.storages', |
|
29
|
|
|
'innmind_rest.server.storage' |
|
30
|
2 |
|
)) |
|
31
|
2 |
|
->addCompilerPass(new RegisterDefinitionCompilerPass( |
|
32
|
2 |
|
'innmind_rest.server.definition_compiler', |
|
33
|
|
|
'innmind_rest.server.definition_pass' |
|
34
|
2 |
|
)); |
|
35
|
2 |
|
} |
|
36
|
|
|
} |
|
37
|
|
|
|