PHP Интерфейс BrowscapPHP\Cache\BrowscapCacheInterface

Автор: Thomas Müller ([email protected])
Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
__construct ( WurflCache\Adapter\AdapterInterface $adapter ) Constructor class, checks for the existence of (and loads) the cache and if needed updated the definitions
flush ( ) : boolean Flush the whole storage
getItem ( string $cacheId, boolean $withVersion = true, boolean &$success = null ) : mixed Get an item.
getReleaseDate ( ) : string Gets the release date of the Browscap data
getType ( ) : string Gets the type of the Browscap data
getVersion ( ) : integer Gets the version of the Browscap data
hasItem ( string $cacheId, boolean $withVersion = true ) : boolean Test if an item exists.
removeItem ( string $cacheId, boolean $withVersion = true ) : boolean Remove an item.
setItem ( string $cacheId, mixed $content, boolean $withVersion = true ) : boolean save the content into an php file

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

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

Constructor class, checks for the existence of (and loads) the cache and if needed updated the definitions
public __construct ( WurflCache\Adapter\AdapterInterface $adapter )
$adapter WurflCache\Adapter\AdapterInterface

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

Flush the whole storage
public flush ( ) : boolean
Результат boolean

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

Get an item.
public getItem ( string $cacheId, boolean $withVersion = true, boolean &$success = null ) : mixed
$cacheId string
$withVersion boolean
$success boolean
Результат mixed Data on success, null on failure

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

Gets the release date of the Browscap data
public getReleaseDate ( ) : string
Результат string

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

Gets the type of the Browscap data
public getType ( ) : string
Результат string

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

Gets the version of the Browscap data
public getVersion ( ) : integer
Результат integer

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

Test if an item exists.
public hasItem ( string $cacheId, boolean $withVersion = true ) : boolean
$cacheId string
$withVersion boolean
Результат boolean

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

Remove an item.
public removeItem ( string $cacheId, boolean $withVersion = true ) : boolean
$cacheId string
$withVersion boolean
Результат boolean

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

save the content into an php file
public setItem ( string $cacheId, mixed $content, boolean $withVersion = true ) : boolean
$cacheId string The cache id
$content mixed The content to store
$withVersion boolean
Результат boolean whether the file was correctly written to the disk