protected DrupalKernel::attachSynthetic(ContainerInterface $container)
Attach synthetic values on to kernel.
Parameters
ContainerInterface $container: Container object
Return value
ContainerInterface
File
- core/lib/Drupal/Core/DrupalKernel.php, line 1143
Class
- DrupalKernel
- The DrupalKernel class is the core of Drupal itself.
Namespace
Drupal\Core
Code
protected function attachSynthetic(ContainerInterface $container) {
$persist = array();
if (isset($this->container)) {
$persist = $this->getServicesToPersist($this->container);
}
$this->persistServices($container, $persist);
// All namespaces must be registered before we attempt to use any service
// from the container.
$this->classLoaderAddMultiplePsr4($container->getParameter('container.namespaces'));
$container->set('kernel', $this);
// Set the class loader which was registered as a synthetic service.
$container->set('class_loader', $this->classLoader);
return $container;
}
Please login to continue.