9 abstract class ElggCache implements \ArrayAccess {
21 $this->variables = array();
33 if (!is_array($this->variables)) {
34 $this->variables = array();
37 $this->variables[$variable] =
$value;
48 if (isset($this->variables[$variable])) {
49 return $this->variables[$variable];
97 return $this->
delete(
$key);
131 abstract public function delete(
$key);
138 abstract public function clear();
151 if (!isset($this[
$key])) {
197 if (isset($this->
$key)) {
212 return isset($this->
$key);
offsetUnset($key)
Unsets a key.
__construct()
Set the constructor.
__isset($key)
Supporting isset, using $this->load() with default values.
add($key, $data)
Add a key only if it doesn't already exist.
__get($key)
Class member get overloading, returning key using $this->load defaults.
offsetExists($key)
Does key exist.
save($key, $data)
Save data in a cache.
offsetGet($key)
Get the value for specified key.
offsetSet($key, $value)
Assigns a value for the specified key.
__set($key, $value)
Class member set overloading, setting a key using $this->save defaults.
load($key, $offset=0, $limit=null)
Load data from the cache using a given key.
clear()
Clear out all the contents of the cache.
setVariable($variable, $value)
Set a cache variable.
__unset($key)
Supporting unsetting of magic attributes.
getVariable($variable)
Get variables for this cache.