class DrupalKernel




Expanded class hierarchy of DrupalKernel


Contains filters are case sensitive
Namesort descending Modifiers Type Description
DrupalKernel::$serviceModifiers protected property @var ServiceModifierInterface[]
DrupalKernel::addServiceModifier public function Add a service modifier to the container builder.
DrupalKernel::createFromRequest public static function @inheritdoc
DrupalKernel::getContainerBuilder protected function @inheritdoc


lib/Drush/Drupal/DrupalKernel.php, line 9

View source
class DrupalKernel extends DrupalDrupalKernel {
  /** @var ServiceModifierInterface[] */
  protected $serviceModifiers =[];

   * @inheritdoc
  public static function createFromRequest(Request $request, $class_loader, $environment, $allow_dumping = TRUE, $app_root = NULL) {
    drush_log(dt("Create from request"), LogLevel::DEBUG);
    $kernel = new static($environment, $class_loader, $allow_dumping, $app_root);
    return $kernel;

   * Add a service modifier to the container builder.
   * The container is not compiled until $kernel->boot(), so there is a chance
   * for clients to add compiler passes et. al. before then.
  public function addServiceModifier(ServiceModifierInterface $serviceModifier) {
    drush_log(dt("add service modifier"), LogLevel::DEBUG);
    $this->serviceModifiers[] = $serviceModifier;

   * @inheritdoc
  protected function getContainerBuilder() {
    drush_log(dt("get container builder"), LogLevel::DEBUG);
    $container = parent::getContainerBuilder();
    foreach ($this->serviceModifiers as $serviceModifier) {
    return $container;
1 file declares its use of DrupalKernel
DrupalBoot8.php in lib/Drush/Boot/DrupalBoot8.php