PHP 클래스 Prado\I18N\core\MessageCache

It can cache each cataloug+variant or just the whole section.
저자: $Author: weizhuo $
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$cache TCache_Lite Cache Lite instance.
$lifetime Caceh life time, default is 1 year.

공개 메소드들

메소드 설명
__construct ( string $cacheDir ) Create a new Translation cache.
clean ( string $catalogue, string $culture ) Clean up the cache for the specified section and locale.
clear ( ) Flush the cache. Deletes all the cache files.
get ( string $catalogue, string $culture, $lastmodified ) : mixed Get the data from the cache.
getLifeTime ( ) : integer Get the cache life time.
save ( array $data, string $catalogue, string $culture ) Save the data to cache for the specified section and locale.
setLifeTime ( integer $time ) Set the cache life time.

보호된 메소드들

메소드 설명
getGroup ( string $catalogue, string $culture ) Get the cache file GROUP based section and locale.
getID ( string $catalogue, string $culture ) Get the cache file ID based section and locale.

메소드 상세

__construct() 공개 메소드

Create a new Translation cache.
public __construct ( string $cacheDir )
$cacheDir string Directory to store the cache files.

clean() 공개 메소드

Clean up the cache for the specified section and locale.
public clean ( string $catalogue, string $culture )
$catalogue string The translation section.
$culture string The translation locale, e.g. "en_AU".

clear() 공개 메소드

Flush the cache. Deletes all the cache files.
public clear ( )

get() 공개 메소드

Get the data from the cache.
public get ( string $catalogue, string $culture, $lastmodified ) : mixed
$catalogue string The translation section.
$culture string The translation locale, e.g. "en_AU".
리턴 mixed Boolean FALSE if no cache hit. Otherwise, translation table data for the specified section and locale.

getGroup() 보호된 메소드

Get the cache file GROUP based section and locale.
protected getGroup ( string $catalogue, string $culture )
$catalogue string The translation section.
$culture string The translation locale, e.g. "en_AU".

getID() 보호된 메소드

Get the cache file ID based section and locale.
protected getID ( string $catalogue, string $culture )
$catalogue string The translation section.
$culture string The translation locale, e.g. "en_AU".

getLifeTime() 공개 메소드

Get the cache life time.
public getLifeTime ( ) : integer
리턴 integer Cache life time.

save() 공개 메소드

Save the data to cache for the specified section and locale.
public save ( array $data, string $catalogue, string $culture )
$data array The data to save.
$catalogue string The translation section.
$culture string The translation locale, e.g. "en_AU".

setLifeTime() 공개 메소드

Set the cache life time.
public setLifeTime ( integer $time )
$time integer Cache life time.

프로퍼티 상세

$cache 보호되어 있는 프로퍼티

Cache Lite instance.
protected TCache_Lite,Prado\I18N\core $cache
리턴 TCache_Lite

$lifetime 보호되어 있는 프로퍼티

Caceh life time, default is 1 year.
protected $lifetime