PHP Class Cache\Adapter\Common\CacheItem

Author: Aaron Scherer ([email protected])
Author: Tobias Nyholm ([email protected])
Inheritance: implements Cache\Adapter\Common\HasExpirationDateInterface, implements Psr\Cache\CacheItemInterface, implements Cache\Taggable\TaggableItemInterface
Datei anzeigen Open project: php-cache/cache Class Usage Examples

Public Methods

Method Description
__construct ( string $key, Closure | boolean $callable = null, $value = null )
addTag ( $tag )
expiresAfter ( $time )
expiresAt ( $expiration )
get ( )
getExpirationDate ( )
getKey ( )
getTags ( )
isHit ( )
set ( $value )
setTags ( array $tags )

Private Methods

Method Description
initialize ( ) If callable is not null, execute it an populate this object with values.

Method Details

__construct() public method

public __construct ( string $key, Closure | boolean $callable = null, $value = null )
$key string
$callable Closure | boolean or boolean hasValue

addTag() public method

public addTag ( $tag )

expiresAfter() public method

public expiresAfter ( $time )

expiresAt() public method

public expiresAt ( $expiration )

get() public method

public get ( )

getExpirationDate() public method

public getExpirationDate ( )

getKey() public method

public getKey ( )

getTags() public method

public getTags ( )

isHit() public method

public isHit ( )

set() public method

public set ( $value )

setTags() public method

public setTags ( array $tags )
$tags array