PHP Класс Prado\I18N\core\MessageCache

It can cache each cataloug+variant or just the whole section.
Автор: $Author: weizhuo $
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$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