On this page
protected function DrupalKernel::attachSynthetic
protected DrupalKernel::attachSynthetic(ContainerInterface $container)
Attach synthetic values on to kernel.
Parameters
ContainerInterface $container: Container object
Return value
File
- core/lib/Drupal/Core/DrupalKernel.php, line 1092
Class
- DrupalKernel
- The DrupalKernel class is the core of Drupal itself.
Namespace
Drupal\CoreCode
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;
}
© 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::attachSynthetic/8.1.x