/**
* Initializes bundles.
*
* @return void
*
* @throws \LogicException if two bundles share a common name
*/
protected function initializeBundles() { // 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;
} } /**
* The extension point similar to the Bundle::build() method.
*
* Use this method to register compiler passes and manipulate the container during the building process.
*
* @return void
*/