1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the PHP Translation package. |
5
|
|
|
* |
6
|
|
|
* (c) PHP Translation team <[email protected]> |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Translation\Bundle; |
13
|
|
|
|
14
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
15
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle; |
16
|
|
|
use Translation\Bundle\DependencyInjection\CompilerPass\EditInPlacePass; |
17
|
|
|
use Translation\Bundle\DependencyInjection\CompilerPass\ExternalTranslatorPass; |
18
|
|
|
use Translation\Bundle\DependencyInjection\CompilerPass\ExtractorPass; |
19
|
|
|
use Translation\Bundle\DependencyInjection\CompilerPass\FileDumperBackupPass; |
20
|
|
|
use Translation\Bundle\DependencyInjection\CompilerPass\LoaderOrReaderPass; |
21
|
|
|
use Translation\Bundle\DependencyInjection\CompilerPass\StoragePass; |
22
|
|
|
use Translation\Bundle\DependencyInjection\CompilerPass\SymfonyProfilerPass; |
23
|
|
|
use Translation\Bundle\DependencyInjection\CompilerPass\ValidatorVisitorPass; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @author Tobias Nyholm <[email protected]> |
27
|
|
|
*/ |
28
|
|
|
class TranslationBundle extends Bundle |
29
|
|
|
{ |
30
|
|
|
public function build(ContainerBuilder $container) |
31
|
|
|
{ |
32
|
|
|
$container->addCompilerPass(new SymfonyProfilerPass()); |
33
|
|
|
$container->addCompilerPass(new ValidatorVisitorPass()); |
34
|
|
|
$container->addCompilerPass(new ExternalTranslatorPass()); |
35
|
|
|
$container->addCompilerPass(new ExtractorPass()); |
36
|
|
|
$container->addCompilerPass(new StoragePass()); |
37
|
|
|
$container->addCompilerPass(new EditInPlacePass()); |
38
|
|
|
$container->addCompilerPass(new LoaderOrReaderPass()); |
39
|
|
|
$container->addCompilerPass(new FileDumperBackupPass()); |
40
|
|
|
} |
41
|
|
|
} |
42
|
|
|
|