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\PersonBundle\GravitonPersonBundle; |
17
|
|
|
use Graviton\RabbitMqBundle\GravitonRabbitMqBundle; |
18
|
|
|
use Graviton\ProxyBundle\GravitonProxyBundle; |
19
|
|
|
use Graviton\RestBundle\GravitonRestBundle; |
20
|
|
|
use Graviton\SchemaBundle\GravitonSchemaBundle; |
21
|
|
|
use Graviton\SecurityBundle\GravitonSecurityBundle; |
22
|
|
|
use Graviton\SwaggerBundle\GravitonSwaggerBundle; |
23
|
|
|
use Graviton\FileBundle\GravitonFileBundle; |
24
|
|
|
use Graviton\MigrationBundle\GravitonMigrationBundle; |
25
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle; |
26
|
|
|
use Graviton\CoreBundle\Compiler\VersionCompilerPass; |
27
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* GravitonCoreBundle |
31
|
|
|
* |
32
|
|
|
* WARNING: Don't change me without changing Graviton\GeneratorBundle\Manipulator\BundleBundleManipulator |
33
|
|
|
* |
34
|
|
|
* @author List of contributors <https://github.com/libgraviton/graviton/graphs/contributors> |
35
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License |
36
|
|
|
* @link http://swisscom.ch |
37
|
|
|
* |
38
|
|
|
* @see \Graviton\GeneratorBundle\Manipulator\BundleBundleManipulator |
39
|
|
|
*/ |
40
|
|
|
class GravitonCoreBundle extends Bundle implements GravitonBundleInterface |
41
|
|
|
{ |
42
|
|
|
/** |
43
|
|
|
* {@inheritDoc} |
44
|
|
|
* |
45
|
|
|
* set up graviton symfony bundles |
46
|
|
|
* |
47
|
|
|
* @return \Symfony\Component\HttpKernel\Bundle\Bundle[] |
|
|
|
|
48
|
|
|
*/ |
49
|
2 |
|
public function getBundles() |
50
|
|
|
{ |
51
|
|
|
return array( |
52
|
2 |
|
new GravitonExceptionBundle(), |
53
|
2 |
|
new GravitonDocumentBundle(), |
54
|
2 |
|
new GravitonSchemaBundle(), |
55
|
2 |
|
new GravitonRestBundle(), |
56
|
2 |
|
new GravitonI18nBundle(), |
57
|
2 |
|
new GravitonGeneratorBundle(), |
58
|
2 |
|
new GravitonPersonBundle(), |
59
|
2 |
|
new GravitonCacheBundle(), |
60
|
2 |
|
new GravitonLogBundle(), |
61
|
2 |
|
new GravitonSecurityBundle(), |
62
|
2 |
|
new GravitonSwaggerBundle(), |
63
|
2 |
|
new GravitonFileBundle(), |
64
|
2 |
|
new GravitonRabbitMqBundle(), |
65
|
2 |
|
new GravitonMigrationBundle(), |
66
|
2 |
|
new GravitonProxyBundle(), |
67
|
1 |
|
); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* load version compiler pass |
72
|
|
|
* |
73
|
|
|
* @param ContainerBuilder $container container builder |
74
|
|
|
* |
75
|
|
|
* @return void |
76
|
|
|
*/ |
77
|
2 |
|
public function build(ContainerBuilder $container) |
78
|
|
|
{ |
79
|
2 |
|
parent::build($container); |
80
|
|
|
|
81
|
2 |
|
$container->addCompilerPass(new VersionCompilerPass()); |
82
|
2 |
|
$container->addCompilerPass(new EnvParametersCompilerPass()); |
83
|
2 |
|
} |
84
|
|
|
} |
85
|
|
|
|
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.