PHP Interface BrowscapPHP\Cache\BrowscapCacheInterface

Afficher le fichier Open project: browscap/browscap-php Interface Usage Examples

Méthodes publiques

Méthode Description
__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

Method Details

__construct() public méthode

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() public méthode

Flush the whole storage
public flush ( ) : boolean
Résultat boolean

getItem() public méthode

Get an item.
public getItem ( string $cacheId, boolean $withVersion = true, boolean &$success = null ) : mixed
$cacheId string
$withVersion boolean
$success boolean
Résultat mixed Data on success, null on failure

getReleaseDate() public méthode

Gets the release date of the Browscap data
public getReleaseDate ( ) : string
Résultat string

getType() public méthode

Gets the type of the Browscap data
public getType ( ) : string
Résultat string

getVersion() public méthode

Gets the version of the Browscap data
public getVersion ( ) : integer
Résultat integer

hasItem() public méthode

Test if an item exists.
public hasItem ( string $cacheId, boolean $withVersion = true ) : boolean
$cacheId string
$withVersion boolean
Résultat boolean

removeItem() public méthode

Remove an item.
public removeItem ( string $cacheId, boolean $withVersion = true ) : boolean
$cacheId string
$withVersion boolean
Résultat boolean

setItem() public méthode

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
Résultat boolean whether the file was correctly written to the disk