ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilForumNotificationCache Class Reference

Class ilForumNotificationCache. More...

+ Collaboration diagram for ilForumNotificationCache:

Public Member Functions

 fetch (string $id)
 
 store (string $key, $data)
 
 exists (string $id)
 Checks if the current id exists. More...
 
 createKeyByValues (array $values)
 

Private Attributes

 $storage = array()
 

Detailed Description

Member Function Documentation

◆ createKeyByValues()

ilForumNotificationCache::createKeyByValues ( array  $values)
Parameters
array$values
Returns
string - MD5 encoded key based on the given arrays

Definition at line 53 of file class.ilForumNotificationCache.php.

54  {
55  $cacheKey = md5(implode('|', $values));
56 
57  return $cacheKey;
58  }
$values

◆ exists()

ilForumNotificationCache::exists ( string  $id)

Checks if the current id exists.

Parameters
string$id
Returns
bool

Definition at line 43 of file class.ilForumNotificationCache.php.

Referenced by fetch().

44  {
45  return array_key_exists($id, $this->storage);
46  }
if(!array_key_exists('StateId', $_REQUEST)) $id
+ Here is the caller graph for this function:

◆ fetch()

ilForumNotificationCache::fetch ( string  $id)
Parameters
string$id- id to access the cache. SHOULD be md5 encoded
Returns
mixed

Definition at line 19 of file class.ilForumNotificationCache.php.

References $id, and exists().

20  {
21  if (false === $this->exists($id)) {
22  throw new InvalidArgumentException('Storage id doesn\'t exist');
23  }
24 
25  return $this->storage[$id];
26  }
if(!array_key_exists('StateId', $_REQUEST)) $id
exists(string $id)
Checks if the current id exists.
+ Here is the call graph for this function:

◆ store()

ilForumNotificationCache::store ( string  $key,
  $data 
)
Parameters
string$key
mixed$data

Definition at line 32 of file class.ilForumNotificationCache.php.

References $data, and $key.

33  {
34  $this->storage[$key] = $data;
35  }
$key
Definition: croninfo.php:18
$data
Definition: bench.php:6

Field Documentation

◆ $storage

ilForumNotificationCache::$storage = array()
private

Definition at line 12 of file class.ilForumNotificationCache.php.


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