You are here

public function DrupalKernel::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/DrupalKernel.php \Drupal\Core\DrupalKernel::__construct()

Constructs a DrupalKernel object.

Parameters

string $environment: String indicating the environment, e.g. 'prod' or 'dev'.

$class_loader: The class loader. Normally \Composer\Autoload\ClassLoader, as included by the front controller, but may also be decorated; e.g., \Symfony\Component\ClassLoader\ApcClassLoader.

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

2 calls to DrupalKernel::__construct()
TestKernel::__construct in core/lib/Drupal/Core/Test/TestKernel.php
Constructs a DrupalKernel object.
TestRunnerKernel::__construct in core/lib/Drupal/Core/Test/TestRunnerKernel.php
Constructs a DrupalKernel object.
2 methods override DrupalKernel::__construct()
TestKernel::__construct in core/lib/Drupal/Core/Test/TestKernel.php
Constructs a DrupalKernel object.
TestRunnerKernel::__construct in core/lib/Drupal/Core/Test/TestRunnerKernel.php
Constructs a DrupalKernel object.

File

core/lib/Drupal/Core/DrupalKernel.php, line 281
Contains \Drupal\Core\DrupalKernel.

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

public function __construct($environment, $class_loader, $allow_dumping = TRUE) {
  $this->environment = $environment;
  $this->classLoader = $class_loader;
  $this->allowDumping = $allow_dumping;
  $this->root = dirname(dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__))));
}