|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Bankiru\Api; |
|
4
|
|
|
|
|
5
|
|
|
use Bankiru\Api\DependencyInjection\BankiruDoctrineApiExtension; |
|
6
|
|
|
use Bankiru\Api\DependencyInjection\Compiler\ApiFactoryPass; |
|
7
|
|
|
use Bankiru\Api\DependencyInjection\Compiler\ClientCollectorPass; |
|
8
|
|
|
use Bankiru\Api\DependencyInjection\Compiler\LoggerDecoratorPass; |
|
9
|
|
|
use Bankiru\Api\DependencyInjection\Compiler\MappingCollectorPass; |
|
10
|
|
|
use Bankiru\Api\DependencyInjection\Compiler\ProfilerDecoratorPass; |
|
11
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
12
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle; |
|
13
|
|
|
|
|
14
|
|
|
class BankiruDoctrineApiBundle extends Bundle |
|
15
|
|
|
{ |
|
16
|
|
|
public function build(ContainerBuilder $container) |
|
17
|
|
|
{ |
|
18
|
|
|
parent::build($container); |
|
19
|
|
|
$container->addCompilerPass(new ClientCollectorPass()); |
|
20
|
|
|
$container->addCompilerPass(new MappingCollectorPass()); |
|
21
|
|
|
$container->addCompilerPass(new LoggerDecoratorPass()); |
|
22
|
|
|
$container->addCompilerPass(new ProfilerDecoratorPass()); |
|
23
|
|
|
$container->addCompilerPass(new ApiFactoryPass()); |
|
24
|
|
|
} |
|
25
|
|
|
|
|
26
|
|
|
public function getContainerExtension() |
|
27
|
|
|
{ |
|
28
|
|
|
return new BankiruDoctrineApiExtension(); |
|
29
|
|
|
} |
|
30
|
|
|
} |
|
31
|
|
|
|