PHP 클래스 MatthiasMullie\Scrapbook\Adapters\Redis

저자: Matthias Mullie ([email protected])
상속: implements MatthiasMullie\Scrapbook\KeyValueStore
파일 보기 프로젝트 열기: matthiasmullie/scrapbook 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$client Redis
$version string | null

공개 메소드들

메소드 설명
__construct ( Redis $client )
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 & use of non-ttl native methods split up.
getVersion ( ) : string Returns the version of the Redis server we're connecting to.
supportsOptionsArray ( ) : boolean Version-based check to test if passing an options array to set() is supported.
ttl ( integer $expire ) : integer | null Redis expects true TTL, not expiration timestamp.

메소드 상세

__construct() 공개 메소드

public __construct ( Redis $client )
$client Redis

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 & use of non-ttl native methods split up.
protected doIncrement ( string $key, integer $offset, integer $initial, integer $expire ) : integer | boolean
$key string
$offset integer
$initial integer
$expire integer
리턴 integer | boolean

flush() 공개 메소드

public flush ( )

get() 공개 메소드

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

getMulti() 공개 메소드

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

getVersion() 보호된 메소드

Returns the version of the Redis server we're connecting to.
protected getVersion ( ) : string
리턴 string

increment() 공개 메소드

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

replace() 공개 메소드

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

set() 공개 메소드

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

setMulti() 공개 메소드

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

supportsOptionsArray() 보호된 메소드

Version-based check to test if passing an options array to set() is supported.
protected supportsOptionsArray ( ) : boolean
리턴 boolean

touch() 공개 메소드

public touch ( $key, $expire )

ttl() 보호된 메소드

Redis expects true TTL, not expiration timestamp.
protected ttl ( integer $expire ) : integer | null
$expire integer
리턴 integer | null TTL in seconds, or `null` for no expiration

프로퍼티 상세

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

protected Redis,MatthiasMullie\Scrapbook\Adapters $client
리턴 Redis

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

protected string|null $version
리턴 string | null