PHP 클래스 MatthiasMullie\Scrapbook\Adapters\Couchbase

또한 보기: http://docs.couchbase.com/developer/php-2.0/php-intro.html
저자: Matthias Mullie ([email protected])
상속: implements MatthiasMullie\Scrapbook\KeyValueStore
파일 보기 프로젝트 열기: matthiasmullie/scrapbook

보호된 프로퍼티들

프로퍼티 타입 설명
$client CouchbaseBucket

공개 메소드들

메소드 설명
__construct ( CouchbaseBucket $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 We could use $this->client->counter(), but it doesn't seem to respect data types and stores the values as strings instead of integers.
serialize ( mixed $value ) : string | mixed Couchbase doesn't properly remember the data type being stored: arrays and objects are turned into stdClass instances.
unserialize ( mixed $value ) : mixed | integer | float Restore serialized data.

메소드 상세

__construct() 공개 메소드

public __construct ( CouchbaseBucket $client )
$client CouchbaseBucket

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

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 )

replace() 공개 메소드

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

serialize() 보호된 메소드

Couchbase doesn't properly remember the data type being stored: arrays and objects are turned into stdClass instances.
protected serialize ( mixed $value ) : string | mixed
$value mixed
리턴 string | mixed

set() 공개 메소드

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

setMulti() 공개 메소드

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

touch() 공개 메소드

public touch ( $key, $expire )

unserialize() 보호된 메소드

Restore serialized data.
protected unserialize ( mixed $value ) : mixed | integer | float
$value mixed
리턴 mixed | integer | float

프로퍼티 상세

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

protected CouchbaseBucket $client
리턴 CouchbaseBucket