ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\Cache\Container\VoidContainer Class Reference
+ Inheritance diagram for ILIAS\Cache\Container\VoidContainer:
+ Collaboration diagram for ILIAS\Cache\Container\VoidContainer:

Public Member Functions

 __construct (private Request $request)
 
 lock (float $seconds)
 Locks the container for a given amount of seconds (max 300), in this time, get() will return null and has() will return false. More...
 
 isLocked ()
 Returns true if the container is locked. More...
 
 has (string $key)
 Returns true if the container contains a value for the given key. More...
 
 get (string $key, Transformation $transformation)
 Returns the value for the given key, or null if the key does not exist. More...
 
 set (string $key, array|bool|int|string|null $value, ?int $ttl=null)
 
 delete (string $key)
 Deletes the value for the given key. More...
 
 flush ()
 Deletes all values in the container. More...
 
 getAdaptorName ()
 Returns the name of the adaptop used (such as apc, memcache, phpstatic) More...
 
 getContainerName ()
 Returns the name of the container. More...
 
- Public Member Functions inherited from ILIAS\Cache\Container\Container
 set (string $key, string|int|array|bool|null $value, ?int $ttl=null)
 Sets the value for the given key. More...
 

Detailed Description

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

Definition at line 31 of file VoidContainer.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Cache\Container\VoidContainer::__construct ( private Request  $request)

Definition at line 33 of file VoidContainer.php.

35  {
36  }

Member Function Documentation

◆ delete()

ILIAS\Cache\Container\VoidContainer::delete ( string  $key)

Deletes the value for the given key.

Implements ILIAS\Cache\Container\Container.

Definition at line 62 of file VoidContainer.php.

62  : void
63  {
64  // nothing to do
65  }

◆ flush()

ILIAS\Cache\Container\VoidContainer::flush ( )

Deletes all values in the container.

Implements ILIAS\Cache\Container\Container.

Definition at line 67 of file VoidContainer.php.

67  : void
68  {
69  // nothing to do
70  }

◆ get()

ILIAS\Cache\Container\VoidContainer::get ( string  $key,
Transformation  $transformation 
)

Returns the value for the given key, or null if the key does not exist.

Implements ILIAS\Cache\Container\Container.

Definition at line 52 of file VoidContainer.php.

52  : string|int|array|bool|null
53  {
54  return null;
55  }

◆ getAdaptorName()

ILIAS\Cache\Container\VoidContainer::getAdaptorName ( )

Returns the name of the adaptop used (such as apc, memcache, phpstatic)

Implements ILIAS\Cache\Container\Container.

Definition at line 72 of file VoidContainer.php.

72  : string
73  {
74  return 'null';
75  }

◆ getContainerName()

ILIAS\Cache\Container\VoidContainer::getContainerName ( )

Returns the name of the container.

Implements ILIAS\Cache\Container\Container.

Definition at line 77 of file VoidContainer.php.

77  : string
78  {
79  return $this->request->getContainerName();
80  }

◆ has()

ILIAS\Cache\Container\VoidContainer::has ( string  $key)

Returns true if the container contains a value for the given key.

Implements ILIAS\Cache\Container\Container.

Definition at line 47 of file VoidContainer.php.

47  : bool
48  {
49  return false;
50  }

◆ isLocked()

ILIAS\Cache\Container\VoidContainer::isLocked ( )

Returns true if the container is locked.

Implements ILIAS\Cache\Container\Container.

Definition at line 42 of file VoidContainer.php.

42  : bool
43  {
44  return true;
45  }

◆ lock()

ILIAS\Cache\Container\VoidContainer::lock ( float  $seconds)

Locks the container for a given amount of seconds (max 300), in this time, get() will return null and has() will return false.

Exceptions

Implements ILIAS\Cache\Container\Container.

Definition at line 38 of file VoidContainer.php.

38  : void
39  {
40  }

◆ set()

ILIAS\Cache\Container\VoidContainer::set ( string  $key,
array|bool|int|string|null  $value,
?int  $ttl = null 
)

Definition at line 57 of file VoidContainer.php.

57  : void
58  {
59  // nothing to do
60  }

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