class BootstrapConfigStorageFactory

Defines a factory for retrieving the config storage used pre-kernel.

Hierarchy

Expanded class hierarchy of BootstrapConfigStorageFactory

1 file declares its use of BootstrapConfigStorageFactory
DrupalKernel.php in drupal/core/lib/Drupal/Core/DrupalKernel.php
Definition of Drupal\Core\DrupalKernel.

File

drupal/core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php, line 14
Contains Drupal\Core\Config\BootstrapConfigStorageFactory.

Namespace

Drupal\Core\Config
View source
class BootstrapConfigStorageFactory {

  /**
   * Returns a configuration storage implementation.
   *
   * @return \Drupal\Core\Config\StorageInterface
   *   A configuration storage implementation.
   */
  public static function get() {
    $settings = Settings::getSingleton();
    $drupal_bootstrap_config_storage = $settings
      ->get('drupal_bootstrap_config_storage');
    if ($drupal_bootstrap_config_storage && is_callable($drupal_bootstrap_config_storage)) {
      return call_user_func($drupal_bootstrap_config_storage);
    }
    else {
      return new FileStorage(config_get_config_directory(CONFIG_ACTIVE_DIRECTORY));
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BootstrapConfigStorageFactory::get public static function Returns a configuration storage implementation.