Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Kernel.php

function Kernel::getContainer

Overrides KernelInterface::getContainer

File

vendor/symfony/http-kernel/Kernel.php, line 269

Class

Kernel
The Kernel is the heart of the Symfony system.

Namespace

Symfony\Component\HttpKernel

Code

public function getContainer() : ContainerInterface {
    if (!$this->container) {
        throw new \LogicException('Cannot retrieve the container from a non-booted kernel.');
    }
    return $this->container;
}
RSS feed
Powered by Drupal