ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
Container.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Cache\Container;
22 
24 
28 interface Container
29 {
34  public function lock(float $seconds): void;
35 
39  public function isLocked(): bool;
40 
44  public function has(string $key): bool;
45 
49  public function get(string $key, Transformation $transformation): string|int|array|bool|null;
50 
54  public function set(string $key, string|int|array|bool|null $value, ?int $ttl = null): void;
55 
59  public function delete(string $key): void;
60 
64  public function flush(): void;
65 
69  public function getAdaptorName(): string;
70 
74  public function getContainerName(): string;
75 }
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.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getContainerName()
Returns the name of the container.
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.