1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* core infrastructure like logging and framework. |
4
|
|
|
*/ |
5
|
|
|
|
6
|
|
|
namespace Graviton\CoreBundle; |
7
|
|
|
|
8
|
|
|
use Graviton\BundleBundle\GravitonBundleInterface; |
9
|
|
|
use Graviton\CacheBundle\GravitonCacheBundle; |
10
|
|
|
use Graviton\CoreBundle\Compiler\EnvParametersCompilerPass; |
11
|
|
|
use Graviton\DocumentBundle\GravitonDocumentBundle; |
12
|
|
|
use Graviton\ExceptionBundle\GravitonExceptionBundle; |
13
|
|
|
use Graviton\GeneratorBundle\GravitonGeneratorBundle; |
14
|
|
|
use Graviton\I18nBundle\GravitonI18nBundle; |
15
|
|
|
use Graviton\LogBundle\GravitonLogBundle; |
16
|
|
|
use Graviton\RabbitMqBundle\GravitonRabbitMqBundle; |
17
|
|
|
use Graviton\ProxyBundle\GravitonProxyBundle; |
18
|
|
|
use Graviton\RestBundle\GravitonRestBundle; |
19
|
|
|
use Graviton\SchemaBundle\GravitonSchemaBundle; |
20
|
|
|
use Graviton\SecurityBundle\GravitonSecurityBundle; |
21
|
|
|
use Graviton\SwaggerBundle\GravitonSwaggerBundle; |
22
|
|
|
use Graviton\FileBundle\GravitonFileBundle; |
23
|
|
|
use Graviton\MigrationBundle\GravitonMigrationBundle; |
24
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle; |
25
|
|
|
use Graviton\CoreBundle\Compiler\VersionCompilerPass; |
26
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* GravitonCoreBundle |
30
|
|
|
* |
31
|
|
|
* @author List of contributors <https://github.com/libgraviton/graviton/graphs/contributors> |
32
|
|
|
* @license https://opensource.org/licenses/MIT MIT License |
33
|
|
|
* @link http://swisscom.ch |
34
|
|
|
*/ |
35
|
|
|
class GravitonCoreBundle extends Bundle implements GravitonBundleInterface |
36
|
|
|
{ |
37
|
|
|
/** |
38
|
|
|
* {@inheritDoc} |
39
|
|
|
* |
40
|
|
|
* set up graviton symfony bundles |
41
|
|
|
* |
42
|
|
|
* @return \Symfony\Component\HttpKernel\Bundle\Bundle[] |
|
|
|
|
43
|
|
|
*/ |
44
|
8 |
|
public function getBundles() |
45
|
|
|
{ |
46
|
|
|
return array( |
47
|
8 |
|
new GravitonExceptionBundle(), |
48
|
8 |
|
new GravitonDocumentBundle(), |
49
|
8 |
|
new GravitonSchemaBundle(), |
50
|
8 |
|
new GravitonRestBundle(), |
51
|
8 |
|
new GravitonI18nBundle(), |
52
|
8 |
|
new GravitonGeneratorBundle(), |
53
|
8 |
|
new GravitonCacheBundle(), |
54
|
8 |
|
new GravitonLogBundle(), |
55
|
8 |
|
new GravitonSecurityBundle(), |
56
|
8 |
|
new GravitonSwaggerBundle(), |
57
|
8 |
|
new GravitonFileBundle(), |
58
|
8 |
|
new GravitonRabbitMqBundle(), |
59
|
8 |
|
new GravitonMigrationBundle(), |
60
|
8 |
|
new GravitonProxyBundle(), |
61
|
|
|
); |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* load version compiler pass |
66
|
|
|
* |
67
|
|
|
* @param ContainerBuilder $container container builder |
68
|
|
|
* |
69
|
|
|
* @return void |
70
|
|
|
*/ |
71
|
2 |
|
public function build(ContainerBuilder $container) |
72
|
|
|
{ |
73
|
2 |
|
parent::build($container); |
74
|
|
|
|
75
|
2 |
|
$container->addCompilerPass(new VersionCompilerPass()); |
76
|
2 |
|
$container->addCompilerPass(new EnvParametersCompilerPass()); |
77
|
2 |
|
} |
78
|
|
|
} |
79
|
|
|
|
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.