PHP 클래스 MatthiasMullie\Scrapbook\Adapters\Flysystem

Flysystem doesn't allow locking files, though. To guarantee interference from other processes, we'll create separate lock-files to flag a cache key in use.
저자: Matthias Mullie ([email protected])
상속: implements MatthiasMullie\Scrapbook\KeyValueStore
파일 보기 프로젝트 열기: matthiasmullie/scrapbook

보호된 프로퍼티들

프로퍼티 타입 설명
$filesystem League\Flysystem\Filesystem

공개 메소드들

메소드 설명
__construct ( League\Flysystem\Filesystem $filesystem )
add ( $key, $value, $expire )
cas ( $token, $key, $value, $expire )
decrement ( $key, $offset = 1, $initial, $expire )
delete ( $key )
deleteMulti ( array $keys )
flush ( )
get ( $key, &$token = null )
getMulti ( array $keys, array &$tokens = null )
increment ( $key, $offset = 1, $initial, $expire )
replace ( $key, $value, $expire )
set ( $key, $value, $expire )
setMulti ( array $items, $expire )
touch ( $key, $expire )

보호된 메소드들

메소드 설명
doIncrement ( string $key, integer $offset, integer $initial, integer $expire ) : integer | boolean Shared between increment/decrement: both have mostly the same logic (decrement just increments a negative value), but need their validation split up (increment won't accept negative values).
exists ( string $key ) : boolean
lock ( string $key ) : boolean Obtain a lock for a given key.
normalizeTime ( integer $time ) : integer Times can be: * relative (in seconds) to current time, within 30 days * absolute unix timestamp * 0, for infinity.
path ( string $key ) : string
read ( string $key ) : boolean | array Fetch stored data from cache file.
unlock ( string $key ) : boolean Release the lock for a given key.
wrap ( string $value, integer $expire ) : string Build value, token & expiration time to be stored in cache file.

메소드 상세

__construct() 공개 메소드

public __construct ( League\Flysystem\Filesystem $filesystem )
$filesystem League\Flysystem\Filesystem

add() 공개 메소드

public add ( $key, $value, $expire )

cas() 공개 메소드

public cas ( $token, $key, $value, $expire )

decrement() 공개 메소드

public decrement ( $key, $offset = 1, $initial, $expire )

delete() 공개 메소드

public delete ( $key )

deleteMulti() 공개 메소드

public deleteMulti ( array $keys )
$keys array

doIncrement() 보호된 메소드

Shared between increment/decrement: both have mostly the same logic (decrement just increments a negative value), but need their validation split up (increment won't accept negative values).
protected doIncrement ( string $key, integer $offset, integer $initial, integer $expire ) : integer | boolean
$key string
$offset integer
$initial integer
$expire integer
리턴 integer | boolean

exists() 보호된 메소드

protected exists ( string $key ) : boolean
$key string
리턴 boolean

flush() 공개 메소드

public flush ( )

get() 공개 메소드

public get ( $key, &$token = null )

getMulti() 공개 메소드

public getMulti ( array $keys, array &$tokens = null )
$keys array
$tokens array

increment() 공개 메소드

public increment ( $key, $offset = 1, $initial, $expire )

lock() 보호된 메소드

It'll try to get a lock for a couple of times, but ultimately give up if no lock can be obtained in a reasonable time.
protected lock ( string $key ) : boolean
$key string
리턴 boolean

normalizeTime() 보호된 메소드

The first case (relative time) will be normalized into a fixed absolute timestamp.
protected normalizeTime ( integer $time ) : integer
$time integer
리턴 integer

path() 보호된 메소드

protected path ( string $key ) : string
$key string
리턴 string

read() 보호된 메소드

Fetch stored data from cache file.
protected read ( string $key ) : boolean | array
$key string
리턴 boolean | array

replace() 공개 메소드

public replace ( $key, $value, $expire )

set() 공개 메소드

public set ( $key, $value, $expire )

setMulti() 공개 메소드

public setMulti ( array $items, $expire )
$items array

touch() 공개 메소드

public touch ( $key, $expire )

unlock() 보호된 메소드

Release the lock for a given key.
protected unlock ( string $key ) : boolean
$key string
리턴 boolean

wrap() 보호된 메소드

Build value, token & expiration time to be stored in cache file.
protected wrap ( string $value, integer $expire ) : string
$value string
$expire integer
리턴 string

프로퍼티 상세

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

protected Filesystem,League\Flysystem $filesystem
리턴 League\Flysystem\Filesystem