function MTimeProtectedFastFileStorage::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php \Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage::__construct()
  2. 8.9.x core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php \Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage::__construct()
  3. 10 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'];
}

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