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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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.