protected function DrupalKernel::registerModuleNamespaces

Registers the namespace of each enabled module with the class loader.

2 calls to DrupalKernel::registerModuleNamespaces()
DrupalKernel::initializeContainer in drupal/core/lib/Drupal/Core/DrupalKernel.php
Initializes the service container.
DrupalKernel::registerBundles in drupal/core/lib/Drupal/Core/DrupalKernel.php
Returns an array of available bundles.

File

drupal/core/lib/Drupal/Core/DrupalKernel.php, line 418
Definition of Drupal\Core\DrupalKernel.

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

protected function registerModuleNamespaces($moduleFileNames) {
  foreach ($moduleFileNames as $module => $filename) {
    $this->classLoader
      ->registerNamespace("Drupal\\{$module}", DRUPAL_ROOT . '/' . dirname($filename) . '/lib');
  }
}