PHP 클래스 Stash\Pool

저자: Robert Hafner ([email protected])
상속: implements Stash\Interfaces\PoolInterface
파일 보기 프로젝트 열기: tedivm/stash 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$driver Stash\Interfaces\DriverInterface The cacheDriver being used by the system. While this class handles all of the higher functions, it's the cache driver here that handles all of the storage/retrieval functionality. This value is set by the constructor.
$isDisabled boolean Is this Pool disabled.
$itemClass string Default "Item" class to use for making new items.
$logger Psr\Log\LoggerInterface If set various then errors and exceptions will get passed to the PSR Compliant logging library. This can be set using the setLogger() function in this class.
$namespace string Current namespace, if any.

공개 메소드들

메소드 설명
__construct ( Stash\Interfaces\DriverInterface $driver = null ) The constructor takes a Driver class which is used for persistent storage. If no driver is provided then the Ephemeral driver is used by default.
clear ( )
commit ( )
deleteItem ( $key )
deleteItems ( array $keys )
getDriver ( )
getItem ( $key )
getItems ( array $keys = [] )
getNamespace ( )
hasItem ( $key )
purge ( )
save ( Psr\Cache\CacheItemInterface $item )
saveDeferred ( Psr\Cache\CacheItemInterface $item )
setDriver ( Stash\Interfaces\DriverInterface $driver )
setItemClass ( $class )
setLogger ( $logger )
setNamespace ( $namespace = null )

보호된 메소드들

메소드 설명
logException ( string $message, Exception $exception ) : boolean Logs an exception with the Logger class, if it exists.

메소드 상세

__construct() 공개 메소드

The constructor takes a Driver class which is used for persistent storage. If no driver is provided then the Ephemeral driver is used by default.
public __construct ( Stash\Interfaces\DriverInterface $driver = null )
$driver Stash\Interfaces\DriverInterface

clear() 공개 메소드

public clear ( )

commit() 공개 메소드

public commit ( )

deleteItem() 공개 메소드

public deleteItem ( $key )

deleteItems() 공개 메소드

public deleteItems ( array $keys )
$keys array

getDriver() 공개 메소드

public getDriver ( )

getItem() 공개 메소드

public getItem ( $key )

getItems() 공개 메소드

public getItems ( array $keys = [] )
$keys array

getNamespace() 공개 메소드

public getNamespace ( )

hasItem() 공개 메소드

public hasItem ( $key )

logException() 보호된 메소드

Logs an exception with the Logger class, if it exists.
protected logException ( string $message, Exception $exception ) : boolean
$message string
$exception Exception
리턴 boolean

purge() 공개 메소드

public purge ( )

save() 공개 메소드

public save ( Psr\Cache\CacheItemInterface $item )
$item Psr\Cache\CacheItemInterface

saveDeferred() 공개 메소드

public saveDeferred ( Psr\Cache\CacheItemInterface $item )
$item Psr\Cache\CacheItemInterface

setDriver() 공개 메소드

public setDriver ( Stash\Interfaces\DriverInterface $driver )
$driver Stash\Interfaces\DriverInterface

setItemClass() 공개 메소드

public setItemClass ( $class )

setLogger() 공개 메소드

public setLogger ( $logger )

setNamespace() 공개 메소드

public setNamespace ( $namespace = null )

프로퍼티 상세

$driver 보호되어 있는 프로퍼티

The cacheDriver being used by the system. While this class handles all of the higher functions, it's the cache driver here that handles all of the storage/retrieval functionality. This value is set by the constructor.
protected DriverInterface,Stash\Interfaces $driver
리턴 Stash\Interfaces\DriverInterface

$isDisabled 보호되어 있는 프로퍼티

Is this Pool disabled.
protected bool $isDisabled
리턴 boolean

$itemClass 보호되어 있는 프로퍼티

Default "Item" class to use for making new items.
protected string $itemClass
리턴 string

$logger 보호되어 있는 프로퍼티

If set various then errors and exceptions will get passed to the PSR Compliant logging library. This can be set using the setLogger() function in this class.
protected Psr\Log\LoggerInterface $logger
리턴 Psr\Log\LoggerInterface

$namespace 보호되어 있는 프로퍼티

Current namespace, if any.
protected string $namespace
리턴 string