function Kernel::initializeBundles
Initializes bundles.
Throws
\LogicException if two bundles share a common name
1 call to Kernel::initializeBundles()
- Kernel::preBoot in vendor/
symfony/ http-kernel/ Kernel.php
File
-
vendor/
symfony/ http-kernel/ Kernel.php, line 335
Class
- Kernel
- The Kernel is the heart of the Symfony system.
Namespace
Symfony\Component\HttpKernelCode
protected function initializeBundles() : void {
// init bundles
$this->bundles = [];
foreach ($this->registerBundles() as $bundle) {
$name = $bundle->getName();
if (isset($this->bundles[$name])) {
throw new \LogicException(\sprintf('Trying to register two bundles with the same name "%s".', $name));
}
$this->bundles[$name] = $bundle;
}
}