ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Cache\Adaptor\PHPStatic Class Reference
+ Inheritance diagram for ILIAS\Cache\Adaptor\PHPStatic:
+ Collaboration diagram for ILIAS\Cache\Adaptor\PHPStatic:

Public Member Functions

 __construct (Config $config)
 
 isAvailable ()
 
 has (string $container, string $key)
 
 get (string $container, string $key)
 
 set (string $container, string $key, string $value, int $ttl)
 
 delete (string $container, string $key)
 
 flushContainer (string $container)
 
 flush ()
 
 __construct (Config $config)
 
 isAvailable ()
 
 has (string $container, string $key)
 
 get (string $container, string $key)
 
 set (string $container, string $key, string $value, int $ttl)
 
 delete (string $container, string $key)
 
 flushContainer (string $container)
 
 flush ()
 

Static Protected Attributes

static array $cache = []
 

Additional Inherited Members

- Data Fields inherited from ILIAS\Cache\Adaptor\Adaptor
const CONTAINER_PREFIX_SEPARATOR = ':'
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 28 of file PHPStatic.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Cache\Adaptor\PHPStatic::__construct ( Config  $config)

Implements ILIAS\Cache\Adaptor\Adaptor.

Definition at line 32 of file PHPStatic.php.

33 {
34 }

Member Function Documentation

◆ delete()

ILIAS\Cache\Adaptor\PHPStatic::delete ( string  $container,
string  $key 
)

Implements ILIAS\Cache\Adaptor\Adaptor.

Definition at line 56 of file PHPStatic.php.

56 : void
57 {
58 unset(self::$cache[$container][$key]);
59 }
$container
@noRector
Definition: wac.php:37

References $container.

◆ flush()

ILIAS\Cache\Adaptor\PHPStatic::flush ( )

Implements ILIAS\Cache\Adaptor\Adaptor.

Definition at line 66 of file PHPStatic.php.

66 : void
67 {
68 self::$cache = [];
69 }

◆ flushContainer()

ILIAS\Cache\Adaptor\PHPStatic::flushContainer ( string  $container)

Implements ILIAS\Cache\Adaptor\Adaptor.

Definition at line 61 of file PHPStatic.php.

61 : void
62 {
63 self::$cache[$container] = [];
64 }

References $container.

◆ get()

ILIAS\Cache\Adaptor\PHPStatic::get ( string  $container,
string  $key 
)

Implements ILIAS\Cache\Adaptor\Adaptor.

Definition at line 46 of file PHPStatic.php.

46 : ?string
47 {
48 return self::$cache[$container][$key] ?? null;
49 }

References $container.

◆ has()

ILIAS\Cache\Adaptor\PHPStatic::has ( string  $container,
string  $key 
)

Implements ILIAS\Cache\Adaptor\Adaptor.

Definition at line 41 of file PHPStatic.php.

41 : bool
42 {
43 return isset(self::$cache[$container][$key]);
44 }

References $container.

◆ isAvailable()

ILIAS\Cache\Adaptor\PHPStatic::isAvailable ( )

Implements ILIAS\Cache\Adaptor\Adaptor.

Definition at line 36 of file PHPStatic.php.

36 : bool
37 {
38 return true;
39 }

Referenced by ILIAS\Cache\Adaptor\Factory\getSpecific().

+ Here is the caller graph for this function:

◆ set()

ILIAS\Cache\Adaptor\PHPStatic::set ( string  $container,
string  $key,
string  $value,
int  $ttl 
)

Implements ILIAS\Cache\Adaptor\Adaptor.

Definition at line 51 of file PHPStatic.php.

51 : void
52 {
53 self::$cache[$container][$key] = $value;
54 }

References $container.

Field Documentation

◆ $cache

array ILIAS\Cache\Adaptor\PHPStatic::$cache = []
staticprotected

Definition at line 30 of file PHPStatic.php.


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