|
| | __construct () |
| | Set the constructor. More...
|
| |
| | setVariable ($variable, $value) |
| | Set a cache variable. More...
|
| |
| | getVariable ($variable) |
| | Get variables for this cache. More...
|
| |
| | __get ($key) |
| | Class member get overloading, returning key using $this->load defaults. More...
|
| |
| | __set ($key, $value) |
| | Class member set overloading, setting a key using $this->save defaults. More...
|
| |
| | __isset ($key) |
| | Supporting isset, using $this->load() with default values. More...
|
| |
| | __unset ($key) |
| | Supporting unsetting of magic attributes. More...
|
| |
| | save ($key, $data) |
| | Save data in a cache. More...
|
| |
| | load ($key, $offset=0, $limit=null) |
| | Load data from the cache using a given key. More...
|
| |
| | delete ($key) |
| | Invalidate a key. More...
|
| |
| | clear () |
| | Clear out all the contents of the cache. More...
|
| |
| | add ($key, $data) |
| | Add a key only if it doesn't already exist. More...
|
| |
| | offsetSet ($key, $value) |
| | Assigns a value for the specified key. More...
|
| |
| | offsetGet ($key) |
| | Get the value for specified key. More...
|
| |
| | offsetUnset ($key) |
| | Unsets a key. More...
|
| |
| | offsetExists ($key) |
| | Does key exist. More...
|
| |
Definition at line 9 of file ElggCache.php.
◆ __construct()
| ElggCache::__construct |
( |
| ) |
|
◆ __get()
Class member get overloading, returning key using $this->load defaults.
- Parameters
-
- Returns
- mixed
Definition at line 62 of file ElggCache.php.
◆ __isset()
| ElggCache::__isset |
( |
|
$key | ) |
|
Supporting isset, using $this->load() with default values.
- Parameters
-
| string | $key | The name of the attribute or metadata. |
- Returns
- bool
Definition at line 85 of file ElggCache.php.
◆ __set()
| ElggCache::__set |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
Class member set overloading, setting a key using $this->save defaults.
- Parameters
-
| string | $key | Name |
| mixed | $value | Value |
- Returns
- void
Definition at line 74 of file ElggCache.php.
◆ __unset()
| ElggCache::__unset |
( |
|
$key | ) |
|
Supporting unsetting of magic attributes.
- Parameters
-
| string | $key | The name of the attribute or metadata. |
- Returns
- bool
Definition at line 96 of file ElggCache.php.
◆ add()
| ElggCache::add |
( |
|
$key, |
|
|
|
$data |
|
) |
| |
Add a key only if it doesn't already exist.
Implemented simply here, if you extend this class and your caching engine provides a better way then override this accordingly.
- Parameters
-
| string | $key | Name |
| string | $data | Value |
- Returns
- bool
Definition at line 150 of file ElggCache.php.
◆ clear()
◆ delete()
| ElggCache::delete |
( |
|
$key | ) |
|
|
abstract |
◆ getVariable()
| ElggCache::getVariable |
( |
|
$variable | ) |
|
Get variables for this cache.
- Parameters
-
- Returns
- mixed The variable or null;
Definition at line 47 of file ElggCache.php.
◆ load()
| ElggCache::load |
( |
|
$key, |
|
|
|
$offset = 0, |
|
|
|
$limit = null |
|
) |
| |
|
abstract |
◆ offsetExists()
| ElggCache::offsetExists |
( |
|
$key | ) |
|
Does key exist.
- See also
- \ArrayAccess::offsetExists()
- Parameters
-
| mixed | $key | A key (offset) to check for. |
- Returns
- bool
Definition at line 211 of file ElggCache.php.
◆ offsetGet()
| ElggCache::offsetGet |
( |
|
$key | ) |
|
Get the value for specified key.
- See also
- \ArrayAccess::offsetGet()
- Parameters
-
| mixed | $key | The key (offset) to retrieve. |
- Returns
- mixed
Definition at line 183 of file ElggCache.php.
◆ offsetSet()
| ElggCache::offsetSet |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
Assigns a value for the specified key.
- See also
- \ArrayAccess::offsetSet()
- Parameters
-
| mixed | $key | The key (offset) to assign the value to. |
| mixed | $value | The value to set. |
- Returns
- void
Definition at line 170 of file ElggCache.php.
◆ offsetUnset()
| ElggCache::offsetUnset |
( |
|
$key | ) |
|
Unsets a key.
- See also
- \ArrayAccess::offsetUnset()
- Parameters
-
| mixed | $key | The key (offset) to unset. |
- Returns
- void
Definition at line 196 of file ElggCache.php.
◆ save()
| ElggCache::save |
( |
|
$key, |
|
|
|
$data |
|
) |
| |
|
abstract |
◆ setVariable()
| ElggCache::setVariable |
( |
|
$variable, |
|
|
|
$value |
|
) |
| |
Set a cache variable.
- Parameters
-
| string | $variable | Name |
| string | $value | Value |
- Returns
- void
Definition at line 32 of file ElggCache.php.
The documentation for this class was generated from the following file: