You are here

public function MTimeProtectedFastFileStorage::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php \Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage::__construct()

Constructs this MTimeProtectedFastFileStorage object.

Parameters

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

  • directory: The directory where the files should be stored.
  • secret: A cryptographically hard to guess secret string.

-bin. The storage bin. Multiple storage objects can be instantiated with the same configuration, but for different bins.

Overrides FileStorage::__construct

File

core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php, line 57

Class

MTimeProtectedFastFileStorage
Stores PHP code in files with securely hashed names.

Namespace

Drupal\Component\PhpStorage

Code

public function __construct(array $configuration) {
  parent::__construct($configuration);
  $this->secret = $configuration['secret'];
}