W3cubDocs

/Drupal 8

public function DrupalKernel::__construct

public DrupalKernel::__construct($environment, $class_loader, $allow_dumping = TRUE)

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.

File

core/lib/Drupal/Core/DrupalKernel.php, line 277

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__))));
}

© 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::__construct/8.1.x