ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
Container.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Cache\Container;
22 
27 
31 interface Container
32 {
37  public function lock(float $seconds): void;
38 
42  public function isLocked(): bool;
43 
47  public function has(string $key): bool;
48 
52  public function get(string $key, Transformation $transformation): string|int|array|bool|null;
53 
57  public function set(string $key, string|int|array|bool|null $value, ?int $ttl = null): void;
58 
62  public function delete(string $key): void;
63 
67  public function flush(): void;
68 
72  public function getAdaptorName(): string;
73 
77  public function getContainerName(): string;
78 }
isLocked()
Returns true if the container is locked.
has(string $key)
Returns true if the container contains a value for the given key.
flush()
Deletes all values in the container.
getContainerName()
Returns the name of the container.
string $key
Consumer key/client ID value.
Definition: System.php:193
lock(float $seconds)
Locks the container for a given amount of seconds (max 300), in this time, get() will return null and...
getAdaptorName()
Returns the name of the adaptop used (such as apc, memcache, phpstatic)
A transformation is a function from one datatype to another.