Overview

Namespaces

  • Webmozart
    • KeyValueStore
      • Api
      • Decorator
      • Util

Classes

  • AbstractRedisStore
  • ArrayStore
  • DbalStore
  • JsonFileStore
  • MongoDbStore
  • NullStore
  • PhpRedisStore
  • PredisStore
  • RiakStore
  • SerializingArrayStore
  • Overview
  • Namespace
  • Class

Class PredisStore

A key-value store that uses Predis to connect to a Redis instance.

Webmozart\KeyValueStore\AbstractRedisStore implements Webmozart\KeyValueStore\Api\KeyValueStore
Extended by Webmozart\KeyValueStore\PredisStore
Namespace: Webmozart\KeyValueStore
Since: 1.0
Author: Bernhard Schussek bschussek@gmail.com
Author: Titouan Galopin galopintitouan@gmail.com
Located at PredisStore.php
Methods summary
public
# __construct( Predis\ClientInterface $client = null )

Creates a store backed by a Predis client.

Creates a store backed by a Predis client.

If no client is passed, a new one is created using the default server "127.0.0.1" and the default port 6379.

Parameters

$client
The client used to connect to Redis.
protected mixed
# clientNotFoundValue( )

Return the value corresponding to "not found" for the internal client.

Return the value corresponding to "not found" for the internal client.

Returns

mixed
protected mixed
# clientGet( string $key )

Call the internal client method to fetch a key. Don't have to catch the exceptions.

Call the internal client method to fetch a key. Don't have to catch the exceptions.

Parameters

$key
The key to fetch

Returns

mixed
The raw value
protected array
# clientGetMultiple( array $keys )

Call the internal client method to fetch multiple keys. Don't have to catch the exceptions.

Call the internal client method to fetch multiple keys. Don't have to catch the exceptions.

Parameters

$keys
The keys to fetch

Returns

array
The raw values
protected
# clientSet( string $key, mixed $value )

Call the internal client method to set a value associated to a key. Don't have to catch the exceptions.

Call the internal client method to set a value associated to a key. Don't have to catch the exceptions.

Parameters

$key
$value
protected boolean
# clientRemove( string $key )

Call the internal client method to remove a key. Don't have to catch the exceptions.

Call the internal client method to remove a key. Don't have to catch the exceptions.

Parameters

$key

Returns

boolean
true if the removal worked, false otherwise
protected boolean
# clientExists( string $key )

Call the internal client method to check if a key exists. Don't have to catch the exceptions.

Call the internal client method to check if a key exists. Don't have to catch the exceptions.

Parameters

$key

Returns

boolean
protected
# clientClear( )

Call the internal client method to clear all the keys. Don't have to catch the exceptions.

Call the internal client method to clear all the keys. Don't have to catch the exceptions.

protected array
# clientKeys( )

Call the internal client method to fetch all the keys. Don't have to catch the exceptions.

Call the internal client method to fetch all the keys. Don't have to catch the exceptions.

Returns

array
The keys
Methods inherited from Webmozart\KeyValueStore\AbstractRedisStore
clear(), exists(), get(), getMultiple(), getMultipleOrFail(), getOrFail(), keys(), remove(), set()
Properties inherited from Webmozart\KeyValueStore\AbstractRedisStore
$client
Webmozart Key-Value Store API API documentation generated by ApiGen