class InstallerKernel in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Installer/InstallerKernel.php \Drupal\Core\Installer\InstallerKernel
- 10 core/lib/Drupal/Core/Installer/InstallerKernel.php \Drupal\Core\Installer\InstallerKernel
Extend DrupalKernel to handle force some kernel behaviors.
Hierarchy
- class \Drupal\Core\DrupalKernel implements \Symfony\Component\HttpKernel\TerminableInterface, DrupalKernelInterface uses InstallerRedirectTrait
- class \Drupal\Core\Installer\InstallerKernel
Expanded class hierarchy of InstallerKernel
14 files declare their use of InstallerKernel
- bootstrap.inc in core/
includes/ bootstrap.inc - Functions that need to be loaded on every Drupal request.
- ChainedFastBackendFactory.php in core/
lib/ Drupal/ Core/ Cache/ ChainedFastBackendFactory.php - ConfigImporterBatch.php in core/
lib/ Drupal/ Core/ Config/ Importer/ ConfigImporterBatch.php - ConfigImportSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ ConfigImportSubscriber.php - ConfigInstaller.php in core/
lib/ Drupal/ Core/ Config/ ConfigInstaller.php
File
- core/
lib/ Drupal/ Core/ Installer/ InstallerKernel.php, line 10
Namespace
Drupal\Core\InstallerView source
class InstallerKernel extends DrupalKernel {
/**
* {@inheritdoc}
*/
protected function initializeContainer() {
// Always force a container rebuild.
$this->containerNeedsRebuild = TRUE;
// Ensure the InstallerKernel's container is not dumped.
$this->allowDumping = FALSE;
$container = parent::initializeContainer();
return $container;
}
/**
* Reset the bootstrap config storage.
*
* Use this from a database driver runTasks() if the method overrides the
* bootstrap config storage. Normally the bootstrap config storage is not
* re-instantiated during a single install request. Most drivers will not
* need this method.
*
* @see \Drupal\Core\Database\Install\Tasks::runTasks()
*/
public function resetConfigStorage() {
$this->configStorage = NULL;
}
/**
* Returns the active configuration storage used during early install.
*
* This override changes the visibility so that the installer can access
* config storage before the container is properly built.
*
* @return \Drupal\Core\Config\StorageInterface
* The config storage.
*/
public function getConfigStorage() {
return parent::getConfigStorage();
}
/**
* {@inheritdoc}
*/
public function getInstallProfile() {
global $install_state;
if ($install_state && empty($install_state['installation_finished'])) {
// If the profile has been selected return it.
if (isset($install_state['parameters']['profile'])) {
$profile = $install_state['parameters']['profile'];
}
else {
$profile = NULL;
}
}
else {
$profile = parent::getInstallProfile();
}
return $profile;
}
/**
* Returns TRUE if a Drupal installation is currently being attempted.
*
* @return bool
* TRUE if the installation is currently being attempted.
*/
public static function installationAttempted() {
// This cannot rely on the MAINTENANCE_MODE constant, since that would
// prevent tests from using the non-interactive installer, in which case
// Drupal only happens to be installed within the same request, but
// subsequently executed code does not involve the installer at all.
// @see install_drupal()
return isset($GLOBALS['install_state']) && empty($GLOBALS['install_state']['installation_finished']);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DrupalKernel:: |
protected | property | Whether the container can be dumped. | |
DrupalKernel:: |
protected | property | Whether the kernel has been booted. | |
DrupalKernel:: |
protected | property | Holds the bootstrap container. | |
DrupalKernel:: |
protected | property | Holds the class used for instantiating the bootstrap container. | |
DrupalKernel:: |
protected | property | The class loader object. | |
DrupalKernel:: |
protected | property | Config storage object used for reading enabled modules configuration. | |
DrupalKernel:: |
protected | property | Holds the container instance. | |
DrupalKernel:: |
protected | property | Whether the container needs to be dumped once booting is complete. | |
DrupalKernel:: |
protected | property | Whether the container needs to be rebuilt the next time it is initialized. | |
DrupalKernel:: |
protected | property | Holds the default bootstrap container definition. | |
DrupalKernel:: |
protected | property | The environment, e.g. 'testing', 'install'. | |
DrupalKernel:: |
protected static | property | Whether the PHP environment has been initialized. | |
DrupalKernel:: |
protected | property | List of available modules and installation profiles. | |
DrupalKernel:: |
protected | property | Holds the list of enabled modules. | |
DrupalKernel:: |
protected | property | Holds the class used for dumping the container to a PHP array. | |
DrupalKernel:: |
protected | property | Whether essential services have been set up properly by preHandle(). | |
DrupalKernel:: |
protected | property | The app root. | |
DrupalKernel:: |
protected | property | List of discovered service provider class names or objects. | |
DrupalKernel:: |
protected | property | List of instantiated service provider classes. | |
DrupalKernel:: |
protected | property | List of discovered services.yml pathnames. | |
DrupalKernel:: |
protected | property | The site directory. | |
DrupalKernel:: |
protected | function | Add service files. | |
DrupalKernel:: |
protected | function | Attach synthetic values on to kernel. | |
DrupalKernel:: |
public | function |
Boots the current kernel. Overrides DrupalKernelInterface:: |
1 |
DrupalKernel:: |
public static | function | Setup a consistent PHP environment. | |
DrupalKernel:: |
protected | function | Stores the container definition in a cache. | 1 |
DrupalKernel:: |
protected | function | Registers a list of namespaces with PSR-4 directories for class loading. | |
DrupalKernel:: |
protected | function | Compiles a new service container. | |
DrupalKernel:: |
public static | function | Create a DrupalKernel object from a request. | 1 |
DrupalKernel:: |
public | function |
Discovers available serviceProviders. Overrides DrupalKernelInterface:: |
2 |
DrupalKernel:: |
public static | function | Returns the appropriate site directory for a request. | |
DrupalKernel:: |
public | function |
Gets the app root. Overrides DrupalKernelInterface:: |
|
DrupalKernel:: |
public | function |
Returns the cached container definition - if any. Overrides DrupalKernelInterface:: |
|
DrupalKernel:: |
public | function |
Gets the current container. Overrides DrupalKernelInterface:: |
|
DrupalKernel:: |
protected | function | Gets a new ContainerBuilder instance used to build the service container. | |
DrupalKernel:: |
protected | function | Returns the container cache key based on the environment. | |
DrupalKernel:: |
protected | function | Gets a http kernel from the container | |
DrupalKernel:: |
protected | function | Returns the kernel parameters. | |
DrupalKernel:: |
protected | function | Gets the file name for each enabled module. | |
DrupalKernel:: |
protected | function | Gets the PSR-4 base directories for module namespaces. | |
DrupalKernel:: |
protected | function | Returns an array of Extension class parameters for all enabled modules. | |
DrupalKernel:: |
public | function |
Returns all registered service providers. Overrides DrupalKernelInterface:: |
|
DrupalKernel:: |
protected | function | Returns service instances to persist from an old container to a new one. | |
DrupalKernel:: |
public | function |
Get the site path. Overrides DrupalKernelInterface:: |
|
DrupalKernel:: |
protected static | function | Determine the application root directory based on this file's location. | |
DrupalKernel:: |
public | function | Handles a Request to convert it to a Response. | 1 |
DrupalKernel:: |
protected | function | Converts an exception into a response. | |
DrupalKernel:: |
protected | function | Bootstraps the legacy global request variables. | |
DrupalKernel:: |
protected | function | Registers all service providers to the kernel. | |
DrupalKernel:: |
protected | function | Locate site path and initialize settings singleton. | |
DrupalKernel:: |
public | function |
Invalidate the service container for the next request. Overrides DrupalKernelInterface:: |
|
DrupalKernel:: |
public | function |
Helper method that loads legacy Drupal include files. Overrides DrupalKernelInterface:: |
1 |
DrupalKernel:: |
protected | function | Returns module data on the filesystem. | |
DrupalKernel:: |
protected | function | Moves persistent service instances into a new container. | |
DrupalKernel:: |
public | function |
Helper method that does request related initialization. Overrides DrupalKernelInterface:: |
|
DrupalKernel:: |
public | function |
Prepare the kernel for handling a request without handling the request. Overrides DrupalKernelInterface:: |
|
DrupalKernel:: |
public | function |
Force a container rebuild. Overrides DrupalKernelInterface:: |
|
DrupalKernel:: |
public | function | Sets the Container. | |
DrupalKernel:: |
public | function |
Set the current site path. Overrides DrupalKernelInterface:: |
|
DrupalKernel:: |
protected static | function | Sets up the lists of trusted HTTP Host headers. | |
DrupalKernel:: |
public | function |
Shuts down the kernel. Overrides DrupalKernelInterface:: |
|
DrupalKernel:: |
public | function | Terminates a request/response cycle. | |
DrupalKernel:: |
public | function |
Implements Drupal\Core\DrupalKernelInterface::updateModules(). Overrides DrupalKernelInterface:: |
|
DrupalKernel:: |
public static | function | Validates the hostname supplied from the HTTP request. | |
DrupalKernel:: |
protected static | function | Validates a hostname length. | |
DrupalKernel:: |
public | function | Constructs a DrupalKernel object. | 2 |
DrupalKernelInterface:: |
constant | Event fired when the service container finished initializing in subrequest. | ||
InstallerKernel:: |
public | function |
Returns the active configuration storage used during early install. Overrides DrupalKernel:: |
|
InstallerKernel:: |
public | function |
Gets the active install profile. Overrides DrupalKernel:: |
|
InstallerKernel:: |
protected | function |
Initializes the service container. Overrides DrupalKernel:: |
|
InstallerKernel:: |
public static | function | Returns TRUE if a Drupal installation is currently being attempted. | |
InstallerKernel:: |
public | function | Reset the bootstrap config storage. | |
InstallerRedirectTrait:: |
protected | function | Returns whether the current PHP process runs on CLI. | |
InstallerRedirectTrait:: |
protected | function | Determines if an exception handler should redirect to the installer. |