Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Kernel.php

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\HttpKernel

Code

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;
    }
}
RSS feed
Powered by Drupal