PHP Class Horde_Cache_Storage_Base, horde

Author: Michael Slusarz ([email protected])
Inheritance: implements Serializable
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_logger Horde_Log_Logger Logger.
$_params array Parameters.

Méthodes publiques

Méthode Description
__construct ( array $params = [] ) Constructor.
clear ( ) Clears all data from the cache.
exists ( string $key, integer $lifetime ) : boolean Checks if a given key exists in the cache, valid for the given lifetime.
expire ( string $key ) : boolean Expire any existing data for the given key.
get ( string $key, integer $lifetime ) : mixed Retrieve cached data.
serialize ( )
set ( string $key, mixed $data, integer $lifetime ) Store an object in the cache.
setLogger ( Horde_Log_Logger $logger ) Set the logging object.
unserialize ( $data )

Méthodes protégées

Méthode Description
_initOb ( ) Do initialization tasks.

Method Details

__construct() public méthode

Constructor.
public __construct ( array $params = [] )
$params array Configuration parameters.

_initOb() protected méthode

Do initialization tasks.
protected _initOb ( )

clear() abstract public méthode

Clears all data from the cache.
abstract public clear ( )

exists() abstract public méthode

Checks if a given key exists in the cache, valid for the given lifetime.
abstract public exists ( string $key, integer $lifetime ) : boolean
$key string Cache key to check.
$lifetime integer Lifetime of the key in seconds.
Résultat boolean Existence.

expire() abstract public méthode

Expire any existing data for the given key.
abstract public expire ( string $key ) : boolean
$key string Cache key to expire.
Résultat boolean Success or failure.

get() abstract public méthode

Retrieve cached data.
abstract public get ( string $key, integer $lifetime ) : mixed
$key string Object ID to query.
$lifetime integer Lifetime of the object in seconds.
Résultat mixed Cached data, or false if none was found.

serialize() public méthode

public serialize ( )

set() abstract public méthode

Store an object in the cache.
abstract public set ( string $key, mixed $data, integer $lifetime )
$key string Object ID used as the caching key.
$data mixed Data to store in the cache.
$lifetime integer Object lifetime - i.e. the time before the data becomes available for garbage collection. If 0 will not be GC'd.

setLogger() public méthode

Set the logging object.
public setLogger ( Horde_Log_Logger $logger )
$logger Horde_Log_Logger Log object.

unserialize() public méthode

public unserialize ( $data )

Property Details

$_logger protected_oe property

Logger.
protected Horde_Log_Logger $_logger
Résultat Horde_Log_Logger

$_params protected_oe property

Parameters.
protected array $_params
Résultat array