PHP 클래스 Pop\Cache\Cache

저자: Nick Sagona, III ([email protected])
파일 보기 프로젝트 열기: nicksagona/PopPHP 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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