DrupalKernel::__construct

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

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.

string $app_root: (optional) The path to the application root as a string. If not supplied, the application root will be computed.

File

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

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

public function __construct($environment, $class_loader, $allow_dumping = TRUE, $app_root = NULL) {
  $this->environment = $environment;
  $this->classLoader = $class_loader;
  $this->allowDumping = $allow_dumping;
  if ($app_root === NULL) {
    $app_root = static::guessApplicationRoot();
  }
  $this->root = $app_root;
}
doc_Drupal
2016-10-29 09:03:05
Comments
Leave a Comment

Please login to continue.