Methods summary
public
|
|
public
|
#
setVariable( string $variable, string $value )
Set a cache variable.
Parameters
- $variable
string $variable Name
- $value
string $value Value
|
public
mixed
|
#
getVariable( string $variable )
Get variables for this cache.
Get variables for this cache.
Parameters
- $variable
string $variable Name
Returns
mixed The variable or null;
|
public
mixed
|
#
__get( string $key )
Class member get overloading, returning key using $this->load
defaults.
Class member get overloading, returning key using $this->load
defaults.
Parameters
Returns
mixed
|
public
mixed
|
#
__set( string $key, mixed $value )
Class member set overloading, setting a key using $this->save
defaults.
Class member set overloading, setting a key using $this->save
defaults.
Parameters
- $key
string $key Name
- $value
mixed $value Value
Returns
mixed
|
public
boolean
|
#
__isset( string $key )
Supporting isset, using $this->load() with default values.
Supporting isset, using $this->load() with default values.
Parameters
- $key
string $key The name of the attribute or metadata.
Returns
boolean
|
public
boolean
|
#
__unset( string $key )
Supporting unsetting of magic attributes.
Supporting unsetting of magic attributes.
Parameters
- $key
string $key The name of the attribute or metadata.
Returns
boolean
|
abstract public
boolean
|
#
save( string $key, string $data )
Save data in a cache.
Parameters
- $key
string $key Name
- $data
string $data Value
Returns
boolean
|
abstract public
mixed
|
#
load( string $key, integer $offset = 0, integer $limit = null )
Load data from the cache using a given key.
Load data from the cache using a given key.
Parameters
- $key
string $key Name
- $offset
integer $offset Offset
- $limit
integer $limit Limit
Returns
mixed The stored data or false.
|
abstract public
boolean
|
#
delete( string $key )
Invalidate a key
Parameters
Returns
boolean
|
abstract public
boolean
|
#
clear( )
Clear out all the contents of the cache.
Clear out all the contents of the cache.
Returns
boolean
|
public
boolean
|
#
add( string $key, string $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.
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
- $key
string $key Name
- $data
string $data Value
Returns
boolean
|
public
|
#
offsetSet( mixed $key, mixed $value )
Assigns a value for the specified key
Assigns a value for the specified key
Parameters
- $key
mixed $key The key (offset) to assign the value to.
- $value
mixed $value The value to set.
See
Implementation of
|
public
mixed
|
#
offsetGet( mixed $key )
Get the value for specified key
Get the value for specified key
Parameters
- $key
mixed $key The key (offset) to retrieve.
Returns
mixed
See
Implementation of
|
public
|
#
offsetUnset( mixed $key )
Unsets a key.
Parameters
- $key
mixed $key The key (offset) to unset.
See
Implementation of
|
public
boolean
|
#
offsetExists( mixed $key )
Does key exist
Parameters
- $key
mixed $key A key (offset) to check for.
Returns
boolean
See
Implementation of
|