PHP Класс MatthiasMullie\Scrapbook\Adapters\Couchbase

См. также: http://docs.couchbase.com/developer/php-2.0/php-intro.html
Автор: Matthias Mullie ([email protected])
Наследование: implements MatthiasMullie\Scrapbook\KeyValueStore
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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