protected DrupalKernel::persistServices(ContainerInterface $container, array $persist)
Moves persistent service instances into a new container.
File
- core/lib/Drupal/Core/DrupalKernel.php, line 1096
 
Class
- DrupalKernel
 - The DrupalKernel class is the core of Drupal itself.
 
Namespace
Drupal\Core
Code
protected function persistServices(ContainerInterface $container, array $persist) {
  foreach ($persist as $id => $object) {
    // Do not override services already set() on the new container, for
    // example 'service_container'.
    if (!$container->initialized($id)) {
      $container->set($id, $object);
    }
  }
}
Please login to continue.