Moves persistent service instances into a new container.
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);
}
}
}