ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
PHPStatic.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Cache\Adaptor
;
22
23
use
ILIAS\Cache\Config
;
24
28
class
PHPStatic
implements
Adaptor
29
{
30
protected
static
array
$cache
= [];
31
32
public
function
__construct
(
Config
$config)
33
{
34
}
35
36
public
function
isAvailable
(): bool
37
{
38
return
true
;
39
}
40
41
public
function
has
(
string
$container
,
string
$key): bool
42
{
43
return
isset(self::$cache[
$container
][$key]);
44
}
45
46
public
function
get
(
string
$container
,
string
$key): ?
string
47
{
48
return
self::$cache[
$container
][$key] ??
null
;
49
}
50
51
public
function
set
(
string
$container
,
string
$key,
string
$value,
int
$ttl):
void
52
{
53
self::$cache[
$container
][$key] = $value;
54
}
55
56
public
function
delete
(
string
$container
,
string
$key):
void
57
{
58
unset(self::$cache[
$container
][$key]);
59
}
60
61
public
function
flushContainer
(
string
$container
): void
62
{
63
self::$cache[
$container
] = [];
64
}
65
66
public
function
flush
(): void
67
{
68
self::$cache = [];
69
}
70
}
ILIAS\Cache\Adaptor\PHPStatic
Definition:
PHPStatic.php:29
ILIAS\Cache\Adaptor\PHPStatic\$cache
static array $cache
Definition:
PHPStatic.php:30
ILIAS\Cache\Adaptor\PHPStatic\isAvailable
isAvailable()
Definition:
PHPStatic.php:36
ILIAS\Cache\Adaptor\PHPStatic\flushContainer
flushContainer(string $container)
Definition:
PHPStatic.php:61
ILIAS\Cache\Adaptor\PHPStatic\flush
flush()
Definition:
PHPStatic.php:66
ILIAS\Cache\Adaptor\PHPStatic\has
has(string $container, string $key)
Definition:
PHPStatic.php:41
ILIAS\Cache\Adaptor\PHPStatic\__construct
__construct(Config $config)
Definition:
PHPStatic.php:32
ILIAS\Cache\Config
Definition:
Config.php:30
ILIAS\Cache\Adaptor\Adaptor
Definition:
Adaptor.php:29
ILIAS\Cache\Adaptor
Definition:
Adaptor.php:21
$container
$container
@noRector
Definition:
wac.php:37
components
ILIAS
Cache
src
Adaptor
PHPStatic.php
Generated on Sat Oct 18 2025 23:02:41 for ILIAS by
1.9.4 (using
Doxyfile
)