@@ 23-55 (lines=33) @@ | ||
20 | /** |
|
21 | * @author Théo FIDRY <[email protected]> |
|
22 | */ |
|
23 | class ConfigurableKernel extends Kernel |
|
24 | { |
|
25 | private $addedBundles = []; |
|
26 | ||
27 | /** |
|
28 | * @inheritdoc |
|
29 | */ |
|
30 | public function registerBundles() |
|
31 | { |
|
32 | return array_merge( |
|
33 | [ |
|
34 | new FrameworkBundle(), |
|
35 | new HautelookAliceBundle(), |
|
36 | ], |
|
37 | $this->addedBundles |
|
38 | ); |
|
39 | } |
|
40 | ||
41 | public function addBundle(Bundle $bundle): self |
|
42 | { |
|
43 | $this->addedBundles[] = $bundle; |
|
44 | ||
45 | return $this; |
|
46 | } |
|
47 | ||
48 | /** |
|
49 | * @inheritdoc |
|
50 | */ |
|
51 | public function registerContainerConfiguration(LoaderInterface $loader) |
|
52 | { |
|
53 | $loader->load(__DIR__.'/config/config.yml'); |
|
54 | } |
|
55 | } |
|
56 |
@@ 16-49 (lines=34) @@ | ||
13 | * @package Hautelook\AliceBundle\Functional |
|
14 | * @author Dennis Langen <[email protected]> |
|
15 | */ |
|
16 | class WithoutDoctrineKernel extends Kernel |
|
17 | { |
|
18 | ||
19 | private $addedBundles = []; |
|
20 | ||
21 | /** |
|
22 | * @inheritdoc |
|
23 | */ |
|
24 | public function registerBundles() |
|
25 | { |
|
26 | return array_merge( |
|
27 | [ |
|
28 | new FrameworkBundle(), |
|
29 | new HautelookAliceBundle(), |
|
30 | ], |
|
31 | $this->addedBundles |
|
32 | ); |
|
33 | } |
|
34 | ||
35 | public function addBundle(Bundle $bundle): self |
|
36 | { |
|
37 | $this->addedBundles[] = $bundle; |
|
38 | ||
39 | return $this; |
|
40 | } |
|
41 | ||
42 | /** |
|
43 | * @inheritdoc |
|
44 | */ |
|
45 | public function registerContainerConfiguration(LoaderInterface $loader) |
|
46 | { |
|
47 | $loader->load(__DIR__.'/config/config_without_doctrine.yml'); |
|
48 | } |
|
49 | } |
|
50 |