PHP Класс Snc\RedisBundle\Tests\Profiler\Storage\Mock\RedisMock

Автор: Andrej Hudec ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
append ( string $key, string $value ) : integer Append data to an existing item.
close ( ) : boolean Close Redis server connection.
connect ( string $host, integer $port = 6379, float $timeout ) : boolean Add a server to connection pool.
del ( string | array $key ) : integer Remove specified keys.
exists ( string $key ) : boolean Verify if the specified key exists.
expire ( string $key, integer $ttl ) : boolean Sets an expiration time on an item.
flushAll ( ) : boolean Flush all existing items from all databases at the server.
get ( string $key ) : boolean Retrieve item from the server.
select ( $dbnum )
setex ( string $key, integer $ttl, mixed $value ) : boolean Store data at the server with expiration time.

Приватные методы

Метод Описание
getData ( $key )
storeData ( $key, $value )

Описание методов

append() публичный Метод

Append data to an existing item.
public append ( string $key, string $value ) : integer
$key string
$value string
Результат integer Size of the value after the append

close() публичный Метод

Close Redis server connection.
public close ( ) : boolean
Результат boolean

connect() публичный Метод

Add a server to connection pool.
public connect ( string $host, integer $port = 6379, float $timeout ) : boolean
$host string
$port integer
$timeout float
Результат boolean

del() публичный Метод

Remove specified keys.
public del ( string | array $key ) : integer
$key string | array
Результат integer

exists() публичный Метод

Verify if the specified key exists.
public exists ( string $key ) : boolean
$key string
Результат boolean

expire() публичный Метод

Sets an expiration time on an item.
public expire ( string $key, integer $ttl ) : boolean
$key string
$ttl integer
Результат boolean

flushAll() публичный Метод

Flush all existing items from all databases at the server.
public flushAll ( ) : boolean
Результат boolean

get() публичный Метод

Retrieve item from the server.
public get ( string $key ) : boolean
$key string
Результат boolean

select() публичный Метод

public select ( $dbnum )

setex() публичный Метод

Store data at the server with expiration time.
public setex ( string $key, integer $ttl, mixed $value ) : boolean
$key string
$ttl integer
$value mixed
Результат boolean