public DrupalKernel::setContainer(ContainerInterface $container = NULL)
Sets the container.
ContainerInterface|null $container A ContainerInterface instance or null:
Overrides ContainerAwareInterface::setContainer
public function setContainer(ContainerInterface $container = NULL) { if (isset($this->container)) { throw new \Exception('The container should not override an existing container.'); } if ($this->booted) { throw new \Exception('The container cannot be set after a booted kernel.'); } $this->container = $container; return $this; }
© 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::setContainer/8.1.x