DrupalKernel::initializeServiceProviders

protected DrupalKernel::initializeServiceProviders()

Registers all service providers to the kernel.

Throws

\LogicException

File

core/lib/Drupal/Core/DrupalKernel.php, line 1263

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

protected function initializeServiceProviders() {
  $this->discoverServiceProviders();
  $this->serviceProviders = array(
    'app' => array(),
    'site' => array(),
  );
  foreach ($this->serviceProviderClasses as $origin => $classes) {
    foreach ($classes as $name => $class) {
      if (!is_object($class)) {
        $this->serviceProviders[$origin][$name] = new $class();
      }
      else {
        $this->serviceProviders[$origin][$name] = $class;
      }
    }
  }
}
doc_Drupal
2016-10-29 09:03:02
Comments
Leave a Comment

Please login to continue.