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