protected DrupalKernel::persistServices(ContainerInterface $container, array $persist)
Moves persistent service instances into a new container.
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); } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!DrupalKernel.php/function/DrupalKernel::persistServices/8.1.x