protected function DrupalKernel::persistServices

Moves persistent service instances into a new container.

1 call to DrupalKernel::persistServices()
DrupalKernel::initializeContainer in drupal/core/lib/Drupal/Core/DrupalKernel.php
Initializes the service container.

File

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

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

protected function persistServices(array $persist) {
  foreach ($persist as $id => $object) {

    // Do not override services already set() on the new container, for
    // example 'service_container'.
    if (!$this->container
      ->initialized($id)) {
      $this->container
        ->set($id, $object);
    }
  }
}