PHP Класс Resque_Redis, php-resque

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

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

Метод Описание
__call ( string $name, array $args ) : mixed Magic method to handle all function requests and prefix key based operations with the {self::$defaultNamespace} key prefix.
__construct ( string | array $server, integer $database = null, object $client = null )
getPrefix ( )
parseDsn ( string $dsn ) : array Parse a DSN string, which can have one of the following formats:
prefix ( string $namespace ) Set Redis namespace (prefix) default: resque
removePrefix ( $string )

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

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

Magic method to handle all function requests and prefix key based operations with the {self::$defaultNamespace} key prefix.
public __call ( string $name, array $args ) : mixed
$name string The name of the method called.
$args array Array of supplied arguments to the method.
Результат mixed Return value from Resident::call() based on the command.

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

public __construct ( string | array $server, integer $database = null, object $client = null )
$server string | array A DSN or array
$database integer A database number to select. However, if we find a valid database number in the DSN the DSN-supplied value will be used instead and this parameter is ignored.
$client object Optional Credis_Cluster or Credis_Client instance instantiated by you

getPrefix() публичный статический Метод

public static getPrefix ( )

parseDsn() публичный статический Метод

- host:port - redis://user:pass@host:port/db?option1=val1&option2=val2 - tcp://user:pass@host:port/db?option1=val1&option2=val2 - unix:///path/to/redis.sock Note: the 'user' part of the DSN is not used.
public static parseDsn ( string $dsn ) : array
$dsn string A DSN string
Результат array An array of DSN compotnents, with 'false' values for any unknown components. e.g. [host, port, db, user, pass, options]

prefix() публичный статический Метод

Set Redis namespace (prefix) default: resque
public static prefix ( string $namespace )
$namespace string

removePrefix() публичный статический Метод

public static removePrefix ( $string )