PHP 클래스 BrowscapPHP\Cache\BrowscapCache

저자: Thomas Müller ([email protected])
상속: implements BrowscapPHP\Cache\BrowscapCacheInterface
파일 보기 프로젝트 열기: browscap/browscap-php 1 사용 예제들

공개 메소드들

메소드 설명
__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