PHP Класс Pop\Cache\Cache

Автор: Nick Sagona, III ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$adapter mixed Cache adapter
$lifetime integer Lifetime value

Открытые методы

Метод Описание
__construct ( Pop\Cache\Adapter\AdapterInterface $adapter, integer $lifetime ) : Cache Constructor
adapter ( ) : mixed Method to get the adapter
clear ( ) : void Method to clear all stored values from cache.
factory ( Pop\Cache\Adapter\AdapterInterface $adapter, integer $lifetime ) : Cache Static method to instantiate the cache object and return itself to facilitate chaining methods together.
getAdapters ( ) : array Static method to determine available adapters
getLifetime ( ) : integer Method to get the cache lifetime.
load ( string $id ) : mixed Method to load a value from cache.
remove ( string $id ) : void Method to delete a value in cache.
save ( string $id, mixed $value ) : void Method to save a value to cache.
setLifetime ( integer $time ) : Cache Method to set the cache lifetime.

Описание методов

__construct() публичный Метод

Instantiate the cache object
public __construct ( Pop\Cache\Adapter\AdapterInterface $adapter, integer $lifetime ) : Cache
$adapter Pop\Cache\Adapter\AdapterInterface
$lifetime integer
Результат Cache

adapter() публичный Метод

Method to get the adapter
public adapter ( ) : mixed
Результат mixed

clear() публичный Метод

Method to clear all stored values from cache.
public clear ( ) : void
Результат void

factory() публичный статический Метод

Static method to instantiate the cache object and return itself to facilitate chaining methods together.
public static factory ( Pop\Cache\Adapter\AdapterInterface $adapter, integer $lifetime ) : Cache
$adapter Pop\Cache\Adapter\AdapterInterface
$lifetime integer
Результат Cache

getAdapters() публичный статический Метод

Static method to determine available adapters
public static getAdapters ( ) : array
Результат array

getLifetime() публичный Метод

Method to get the cache lifetime.
public getLifetime ( ) : integer
Результат integer

load() публичный Метод

Method to load a value from cache.
public load ( string $id ) : mixed
$id string
Результат mixed

remove() публичный Метод

Method to delete a value in cache.
public remove ( string $id ) : void
$id string
Результат void

save() публичный Метод

Method to save a value to cache.
public save ( string $id, mixed $value ) : void
$id string
$value mixed
Результат void

setLifetime() публичный Метод

Method to set the cache lifetime.
public setLifetime ( integer $time ) : Cache
$time integer
Результат Cache

Описание свойств

$adapter защищенное свойство

Cache adapter
protected mixed $adapter
Результат mixed

$lifetime защищенное свойство

Lifetime value
protected int $lifetime
Результат integer