function FileReadOnlyStorage::__construct

Same name in other branches
  1. 8.9.x core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php \Drupal\Component\PhpStorage\FileReadOnlyStorage::__construct()
  2. 10 core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php \Drupal\Component\PhpStorage\FileReadOnlyStorage::__construct()
  3. 11.x core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php \Drupal\Component\PhpStorage\FileReadOnlyStorage::__construct()

Constructs this FileStorage object.

Parameters

$configuration: An associative array, containing at least two keys (the rest are ignored):

  • 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.

File

core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php, line 26

Class

FileReadOnlyStorage
Reads code as regular PHP files, but won't write them.

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.