ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
League\Flysystem\SafeStorage Class Reference
+ Collaboration diagram for League\Flysystem\SafeStorage:

Public Member Functions

 __construct ()
 
 storeSafely ($key, $value)
 
 retrieveSafely ($key)
 
 __destruct ()
 

Static Protected Attributes

static $safeStorage = []
 

Private Attributes

 $hash
 

Detailed Description

Definition at line 5 of file SafeStorage.php.

Constructor & Destructor Documentation

◆ __construct()

League\Flysystem\SafeStorage::__construct ( )

Definition at line 17 of file SafeStorage.php.

References League\Flysystem\SafeStorage\$hash, and GuzzleHttp\Psr7\hash().

18  {
19  $this->hash = spl_object_hash($this);
20  static::$safeStorage[$this->hash] = [];
21  }
hash(StreamInterface $stream, $algo, $rawOutput=false)
Calculate a hash of a Stream.
Definition: functions.php:406
+ Here is the call graph for this function:

◆ __destruct()

League\Flysystem\SafeStorage::__destruct ( )

Definition at line 35 of file SafeStorage.php.

References GuzzleHttp\Psr7\hash().

36  {
37  unset(static::$safeStorage[$this->hash]);
38  }
hash(StreamInterface $stream, $algo, $rawOutput=false)
Calculate a hash of a Stream.
Definition: functions.php:406
+ Here is the call graph for this function:

Member Function Documentation

◆ retrieveSafely()

League\Flysystem\SafeStorage::retrieveSafely (   $key)

Definition at line 28 of file SafeStorage.php.

References League\Flysystem\SafeStorage\$hash, $key, and GuzzleHttp\Psr7\hash().

29  {
30  if (array_key_exists($key, static::$safeStorage[$this->hash])) {
31  return static::$safeStorage[$this->hash][$key];
32  }
33  }
hash(StreamInterface $stream, $algo, $rawOutput=false)
Calculate a hash of a Stream.
Definition: functions.php:406
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ storeSafely()

League\Flysystem\SafeStorage::storeSafely (   $key,
  $value 
)

Definition at line 23 of file SafeStorage.php.

References League\Flysystem\SafeStorage\$hash, and $key.

24  {
25  static::$safeStorage[$this->hash][$key] = $value;
26  }
$key
Definition: croninfo.php:18

Field Documentation

◆ $hash

League\Flysystem\SafeStorage::$hash
private

◆ $safeStorage

League\Flysystem\SafeStorage::$safeStorage = []
staticprotected

Definition at line 15 of file SafeStorage.php.


The documentation for this class was generated from the following file: