protected function DrupalKernel::getModuleNamespaces

Gets the namespaces of each enabled module.

3 calls to DrupalKernel::getModuleNamespaces()
DrupalKernel::buildContainer in drupal/core/lib/Drupal/Core/DrupalKernel.php
Builds the service container.
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 541
Definition of Drupal\Core\DrupalKernel.

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

protected function getModuleNamespaces($moduleFileNames) {
  $namespaces = array();
  foreach ($moduleFileNames as $module => $filename) {
    $namespaces["Drupal\\{$module}"] = DRUPAL_ROOT . '/' . dirname($filename) . '/lib';
  }
  return $namespaces;
}