ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 28 of file VoidContainer.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 30 of file VoidContainer.php.

32  {
33  }

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 59 of file VoidContainer.php.

59  : void
60  {
61  // nothing to do
62  }

◆ flush()

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

Deletes all values in the container.

Implements ILIAS\Cache\Container\Container.

Definition at line 64 of file VoidContainer.php.

64  : void
65  {
66  // nothing to do
67  }

◆ 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 49 of file VoidContainer.php.

References null.

49  : string|int|array|bool|null
50  {
51  return null;
52  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ 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 69 of file VoidContainer.php.

69  : string
70  {
71  return 'null';
72  }

◆ getContainerName()

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

Returns the name of the container.

Implements ILIAS\Cache\Container\Container.

Definition at line 74 of file VoidContainer.php.

74  : string
75  {
76  return $this->request->getContainerName();
77  }

◆ 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 44 of file VoidContainer.php.

44  : bool
45  {
46  return false;
47  }

◆ isLocked()

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

Returns true if the container is locked.

Implements ILIAS\Cache\Container\Container.

Definition at line 39 of file VoidContainer.php.

39  : bool
40  {
41  return true;
42  }

◆ 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 35 of file VoidContainer.php.

35  : void
36  {
37  }

◆ set()

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

Definition at line 54 of file VoidContainer.php.

54  : void
55  {
56  // nothing to do
57  }

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