You are here

public function InMemoryStorage::__construct in Configuration Provider 8

Constructs a new InMemoryStorage.

Parameters

string $collection: (optional) The collection to store configuration in. Defaults to the default collection.

array $config: (optional) The configuration in the storage.

File

src/InMemoryStorage.php, line 35

Class

InMemoryStorage
Provides an in memory confituration storage.

Namespace

Drupal\config_provider

Code

public function __construct($collection = StorageInterface::DEFAULT_COLLECTION, array $config = []) {
  $this->collection = $collection;
  $this->config = $config;
  if (!isset($this->config[$collection])) {
    $this->config[$collection] = [];
  }
}