function FileStorage::__construct

Same name in this branch
  1. 10 core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::__construct()
Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::__construct()
  2. 9 core/lib/Drupal/Component/PhpStorage/FileStorage.php \Drupal\Component\PhpStorage\FileStorage::__construct()
  3. 8.9.x core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::__construct()
  4. 8.9.x core/lib/Drupal/Component/PhpStorage/FileStorage.php \Drupal\Component\PhpStorage\FileStorage::__construct()
  5. 11.x core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::__construct()
  6. 11.x core/lib/Drupal/Component/PhpStorage/FileStorage.php \Drupal\Component\PhpStorage\FileStorage::__construct()

Constructs this FileStorage object.

Parameters

array $configuration: An associative array, containing at least these two keys:

  • directory: The directory where the files should be stored.
  • bin: The storage bin. Multiple storage objects can be instantiated with the same configuration, but for different bins..
1 call to FileStorage::__construct()
MTimeProtectedFastFileStorage::__construct in core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php
Constructs this MTimeProtectedFastFileStorage object.
1 method overrides FileStorage::__construct()
MTimeProtectedFastFileStorage::__construct in core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php
Constructs this MTimeProtectedFastFileStorage object.

File

core/lib/Drupal/Component/PhpStorage/FileStorage.php, line 28

Class

FileStorage
Stores the code as regular PHP files.

Namespace

Drupal\Component\PhpStorage

Code

public function __construct(array $configuration) {
    $this->directory = $configuration['directory'] . '/' . $configuration['bin'];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.