Elgg  Version 1.11
Public Member Functions | List of all members
ElggCache Class Reference
Inheritance diagram for ElggCache:
ElggFileCache ElggSharedMemoryCache ElggMemcache ElggStaticVariableCache

Public Member Functions

 __construct ()
 Set the constructor. More...
 
 set_variable ($variable, $value)
 Set a cache variable. More...
 
 setVariable ($variable, $value)
 Set a cache variable. More...
 
 get_variable ($variable)
 Get variables for this cache. 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...
 

Detailed Description

Definition at line 9 of file ElggCache.php.

Constructor & Destructor Documentation

ElggCache::__construct ( )

Set the constructor.

Definition at line 20 of file ElggCache.php.

Member Function Documentation

ElggCache::__get (   $key)

Class member get overloading, returning key using $this->load defaults.

Parameters
string$keyName
Returns
mixed

Definition at line 95 of file ElggCache.php.

ElggCache::__isset (   $key)

Supporting isset, using $this->load() with default values.

Parameters
string$keyThe name of the attribute or metadata.
Returns
bool

Definition at line 118 of file ElggCache.php.

ElggCache::__set (   $key,
  $value 
)

Class member set overloading, setting a key using $this->save defaults.

Parameters
string$keyName
mixed$valueValue
Returns
void

Definition at line 107 of file ElggCache.php.

ElggCache::__unset (   $key)

Supporting unsetting of magic attributes.

Parameters
string$keyThe name of the attribute or metadata.
Returns
bool

Definition at line 129 of file ElggCache.php.

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$keyName
string$dataValue
Returns
bool

Definition at line 183 of file ElggCache.php.

ElggCache::clear ( )
abstract

Clear out all the contents of the cache.

Returns
bool
ElggCache::delete (   $key)
abstract

Invalidate a key.

Parameters
string$keyName
Returns
bool
ElggCache::get_variable (   $variable)

Get variables for this cache.

Parameters
string$variableName
Returns
mixed The value or null;

Definition at line 67 of file ElggCache.php.

ElggCache::getVariable (   $variable)

Get variables for this cache.

Parameters
string$variableName
Returns
mixed The variable or null;

Definition at line 80 of file ElggCache.php.

ElggCache::load (   $key,
  $offset = 0,
  $limit = null 
)
abstract

Load data from the cache using a given key.

Parameters
string$keyName
int$offsetOffset
int$limitLimit
Returns
mixed The stored data or false.
ElggCache::offsetExists (   $key)

Does key exist.

See also
::offsetExists()
Parameters
mixed$keyA key (offset) to check for.
Returns
bool

Definition at line 244 of file ElggCache.php.

ElggCache::offsetGet (   $key)

Get the value for specified key.

See also
::offsetGet()
Parameters
mixed$keyThe key (offset) to retrieve.
Returns
mixed

Definition at line 216 of file ElggCache.php.

ElggCache::offsetSet (   $key,
  $value 
)

Assigns a value for the specified key.

See also
::offsetSet()
Parameters
mixed$keyThe key (offset) to assign the value to.
mixed$valueThe value to set.
Returns
void

Definition at line 203 of file ElggCache.php.

ElggCache::offsetUnset (   $key)

Unsets a key.

See also
::offsetUnset()
Parameters
mixed$keyThe key (offset) to unset.
Returns
void

Definition at line 229 of file ElggCache.php.

ElggCache::save (   $key,
  $data 
)
abstract

Save data in a cache.

Parameters
string$keyName
string$dataValue
Returns
bool
ElggCache::set_variable (   $variable,
  $value 
)

Set a cache variable.

Parameters
string$variableName
string$valueValue
Returns
void

Definition at line 35 of file ElggCache.php.

ElggCache::setVariable (   $variable,
  $value 
)

Set a cache variable.

Parameters
string$variableName
string$valueValue
Returns
void

Definition at line 49 of file ElggCache.php.


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