public function DrupalKernel::__construct

Constructs a DrupalKernel object.

Parameters

string $environment: String indicating the environment, e.g. 'prod' or 'dev'. Used by Symfony\Component\HttpKernel\Kernel::__construct(). Drupal does not use this value currently. Pass 'prod'.

bool $debug: Boolean indicating whether we are in debug mode. Used by Symfony\Component\HttpKernel\Kernel::__construct(). Drupal does not use this value currently. Pass TRUE.

\Symfony\Component\ClassLoader\UniversalClassLoader $class_loader: (optional) The classloader is only used if $storage is not given or the load from storage fails and a container rebuild is required. In this case, the loaded modules will be registered with this loader in order to be able to find the module bundles.

bool $allow_dumping: (optional) FALSE to stop the container from being written to or read from disk. Defaults to TRUE.

Overrides Kernel::__construct

File

drupal/core/lib/Drupal/Core/DrupalKernel.php, line 122
Definition of Drupal\Core\DrupalKernel.

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

public function __construct($environment, $debug, UniversalClassLoader $class_loader, $allow_dumping = TRUE) {
  parent::__construct($environment, $debug);
  $this->classLoader = $class_loader;
  $this->allowDumping = $allow_dumping;
}