public function Kernel::getName

Gets the name of the kernel

@api

Return value

string The kernel name

Overrides KernelInterface::getName

1 call to Kernel::getName()
Kernel::__construct in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php
Constructor.
1 method overrides Kernel::getName()
KernelForTest::getName in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php
Gets the name of the kernel

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php, line 355

Class

Kernel
The Kernel is the heart of the Symfony system.

Namespace

Symfony\Component\HttpKernel

Code

public function getName() {
  if (null === $this->name) {
    $this->name = preg_replace('/[^a-zA-Z0-9_]+/', '', basename($this->rootDir));
  }
  return $this->name;
}