PHP Class Resque\Redis

Author: Michael Haynes ([email protected])
Datei anzeigen Open project: mjphaynes/php-resque Class Usage Examples

Protected Properties

Property Type Description
$config Default configuration
$instance Redis instance
$keyCommands List of all commands in Redis that supply a key as their first argument. Used to prefix keys with the Resque namespace.
$namespace Redis namespace
$redis The Predis instance

Public Methods

Method Description
__call ( string $method, array $parameters ) : mixed Dynamically pass calls to the Predis.
__construct ( array $config = [] ) : Redis Establish a Redis connection.
addNamespace ( string $string ) : string Add Redis namespace to a string
getNamespace ( ) : string Get Redis namespace
instance ( ) : Redis Establish a Redis connection
removeNamespace ( string $string ) : string Remove Redis namespace from string
setConfig ( array $config ) Set the Redis config
setNamespace ( string $namespace ) Set Redis namespace

Method Details

__call() public method

Dynamically pass calls to the Predis.
public __call ( string $method, array $parameters ) : mixed
$method string Method to call
$parameters array Arguments to send to method
return mixed

__construct() public method

Establish a Redis connection.
public __construct ( array $config = [] ) : Redis
$config array Array of configuration settings
return Redis

addNamespace() public method

Add Redis namespace to a string
public addNamespace ( string $string ) : string
$string string String to namespace
return string

getNamespace() public method

Get Redis namespace
public getNamespace ( ) : string
return string

instance() public static method

Establish a Redis connection
public static instance ( ) : Redis
return Redis

removeNamespace() public method

Remove Redis namespace from string
public removeNamespace ( string $string ) : string
$string string String to de-namespace
return string

setConfig() public static method

Set the Redis config
public static setConfig ( array $config )
$config array Array of configuration settings

setNamespace() public method

Set Redis namespace
public setNamespace ( string $namespace )
$namespace string New namespace

Property Details

$config protected_oe static_oe property

Default configuration
protected static $config

$instance protected_oe static_oe property

Redis instance
protected static $instance

$keyCommands protected_oe property

List of all commands in Redis that supply a key as their first argument. Used to prefix keys with the Resque namespace.
protected $keyCommands

$namespace protected_oe property

Redis namespace
protected $namespace

$redis protected_oe property

The Predis instance
protected $redis