protected function DrupalKernel::getClassName

Returns the classname based on environment, debug and testing prefix.

Return value

string The class name.

2 calls to DrupalKernel::getClassName()
DrupalKernel::dumpDrupalContainer in drupal/core/lib/Drupal/Core/DrupalKernel.php
Dumps the service container to PHP code in the config directory.
DrupalKernel::initializeContainer in drupal/core/lib/Drupal/Core/DrupalKernel.php
Initializes the service container.

File

drupal/core/lib/Drupal/Core/DrupalKernel.php, line 285
Definition of Drupal\Core\DrupalKernel.

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

protected function getClassName() {
  $parts = array(
    'service_container',
    $this->environment,
    $this->debug,
  );

  // Make sure to use a testing-specific container even in the parent site.
  if (!empty($GLOBALS['drupal_test_info']['test_run_id'])) {
    $parts[] = $GLOBALS['drupal_test_info']['test_run_id'];
  }
  elseif ($prefix = drupal_valid_test_ua()) {
    $parts[] = $prefix;
  }
  return implode('_', $parts);
}