mirror of
https://github.com/predis/predis.git
synced 2026-09-20 15:26:46 +00:00
[tests] Rewrite the whole test suite to allow more granular testing.
Fix also a few bugs found while rewriting the test suite. In order to be able to run integration tests, the test suite requires a version of Redis >= 2.4.0. The units have been splitted into several different groups using PHPUnit @group annotation to allow developers to enable, disable and combine certain types of tests. The available groups are: - disconnected: can run without a Redis server online - connected: active connection to a Redis server is required - commands: test dedicated to a specific Redis command - slow: performs operations that can slow down execution; A list of the available groups can be obtained by running phpunit --list-groups Groups of tests can be disabled or enabled via the XML configuration file or the standard command-line test runner. Please note that due to a bug in PHPUnit, older versions ignore the --group option when the group is excluded in the XML configuration file. Please refer to http://github.com/sebastianbergmann/phpunit/issues/320 for details Integration tests in the @connected group check if the command being tested is defined in the selected server profile (see the value of the TEST_SERVER_VERSION constant in phpunit.xml). If the command is not defined in the target server profile, the integration test is automatically marked as skipped. We also provide an helper script in the bin directory that can be used to automatically generate a file with the scheleton of a test case for a Redis command by specifying the name of the class in the Predis\Commands namespace. For example, to generate a test case for SET (represented by the Predis\Commands\StringSet class): ./bin/generate-command-test.php --class=StringSet The realm of a command is automatically inferred from the name of the class, but it can be set using the --realm option.
This commit is contained in:
@@ -96,9 +96,7 @@ abstract class ServerProfile implements IServerProfile, IProcessingSupport
|
||||
$profileReflection = new \ReflectionClass($profileClass);
|
||||
|
||||
if (!$profileReflection->isSubclassOf('Predis\Profiles\IServerProfile')) {
|
||||
throw new ClientException(
|
||||
"Cannot register '$profileClass' as it is not a valid profile class"
|
||||
);
|
||||
throw new \InvalidArgumentException("Cannot register '$profileClass' as it is not a valid profile class");
|
||||
}
|
||||
|
||||
self::$profiles[$alias] = $profileClass;
|
||||
@@ -146,6 +144,20 @@ abstract class ServerProfile implements IServerProfile, IProcessingSupport
|
||||
return isset($this->commands[strtolower($command)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the FQN of the class that represent the specified command ID
|
||||
* registered in the current server profile.
|
||||
*
|
||||
* @param string $command Command ID.
|
||||
* @return string
|
||||
*/
|
||||
public function getCommandClass($command)
|
||||
{
|
||||
if (isset($this->commands[$command = strtolower($command)])) {
|
||||
return $this->commands[$command];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -189,7 +201,7 @@ abstract class ServerProfile implements IServerProfile, IProcessingSupport
|
||||
{
|
||||
$commandReflection = new \ReflectionClass($command);
|
||||
if (!$commandReflection->isSubclassOf('Predis\Commands\ICommand')) {
|
||||
throw new ClientException("Cannot register '$command' as it is not a valid Redis command");
|
||||
throw new \InvalidArgumentException("Cannot register '$command' as it is not a valid Redis command");
|
||||
}
|
||||
$this->commands[strtolower($alias)] = $command;
|
||||
}
|
||||
@@ -197,12 +209,8 @@ abstract class ServerProfile implements IServerProfile, IProcessingSupport
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setProcessor(ICommandProcessor $processor)
|
||||
public function setProcessor(ICommandProcessor $processor = null)
|
||||
{
|
||||
if (!isset($processor)) {
|
||||
unset($this->processor);
|
||||
return;
|
||||
}
|
||||
$this->processor = $processor;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,91 +35,91 @@ class ServerVersion12 extends ServerProfile
|
||||
/* ---------------- Redis 1.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'exists' => '\Predis\Commands\KeyExists',
|
||||
'del' => '\Predis\Commands\KeyDelete',
|
||||
'type' => '\Predis\Commands\KeyType',
|
||||
'keys' => '\Predis\Commands\KeyKeysV12x',
|
||||
'randomkey' => '\Predis\Commands\KeyRandom',
|
||||
'rename' => '\Predis\Commands\KeyRename',
|
||||
'renamenx' => '\Predis\Commands\KeyRenamePreserve',
|
||||
'expire' => '\Predis\Commands\KeyExpire',
|
||||
'expireat' => '\Predis\Commands\KeyExpireAt',
|
||||
'ttl' => '\Predis\Commands\KeyTimeToLive',
|
||||
'move' => '\Predis\Commands\KeyMove',
|
||||
'sort' => '\Predis\Commands\KeySort',
|
||||
'exists' => 'Predis\Commands\KeyExists',
|
||||
'del' => 'Predis\Commands\KeyDelete',
|
||||
'type' => 'Predis\Commands\KeyType',
|
||||
'keys' => 'Predis\Commands\KeyKeysV12x',
|
||||
'randomkey' => 'Predis\Commands\KeyRandom',
|
||||
'rename' => 'Predis\Commands\KeyRename',
|
||||
'renamenx' => 'Predis\Commands\KeyRenamePreserve',
|
||||
'expire' => 'Predis\Commands\KeyExpire',
|
||||
'expireat' => 'Predis\Commands\KeyExpireAt',
|
||||
'ttl' => 'Predis\Commands\KeyTimeToLive',
|
||||
'move' => 'Predis\Commands\KeyMove',
|
||||
'sort' => 'Predis\Commands\KeySort',
|
||||
|
||||
/* commands operating on string values */
|
||||
'set' => '\Predis\Commands\StringSet',
|
||||
'setnx' => '\Predis\Commands\StringSetPreserve',
|
||||
'mset' => '\Predis\Commands\StringSetMultiple',
|
||||
'msetnx' => '\Predis\Commands\StringSetMultiplePreserve',
|
||||
'get' => '\Predis\Commands\StringGet',
|
||||
'mget' => '\Predis\Commands\StringGetMultiple',
|
||||
'getset' => '\Predis\Commands\StringGetSet',
|
||||
'incr' => '\Predis\Commands\StringIncrement',
|
||||
'incrby' => '\Predis\Commands\StringIncrementBy',
|
||||
'decr' => '\Predis\Commands\StringDecrement',
|
||||
'decrby' => '\Predis\Commands\StringDecrementBy',
|
||||
'set' => 'Predis\Commands\StringSet',
|
||||
'setnx' => 'Predis\Commands\StringSetPreserve',
|
||||
'mset' => 'Predis\Commands\StringSetMultiple',
|
||||
'msetnx' => 'Predis\Commands\StringSetMultiplePreserve',
|
||||
'get' => 'Predis\Commands\StringGet',
|
||||
'mget' => 'Predis\Commands\StringGetMultiple',
|
||||
'getset' => 'Predis\Commands\StringGetSet',
|
||||
'incr' => 'Predis\Commands\StringIncrement',
|
||||
'incrby' => 'Predis\Commands\StringIncrementBy',
|
||||
'decr' => 'Predis\Commands\StringDecrement',
|
||||
'decrby' => 'Predis\Commands\StringDecrementBy',
|
||||
|
||||
/* commands operating on lists */
|
||||
'rpush' => '\Predis\Commands\ListPushTail',
|
||||
'lpush' => '\Predis\Commands\ListPushHead',
|
||||
'llen' => '\Predis\Commands\ListLength',
|
||||
'lrange' => '\Predis\Commands\ListRange',
|
||||
'ltrim' => '\Predis\Commands\ListTrim',
|
||||
'lindex' => '\Predis\Commands\ListIndex',
|
||||
'lset' => '\Predis\Commands\ListSet',
|
||||
'lrem' => '\Predis\Commands\ListRemove',
|
||||
'lpop' => '\Predis\Commands\ListPopFirst',
|
||||
'rpop' => '\Predis\Commands\ListPopLast',
|
||||
'rpoplpush' => '\Predis\Commands\ListPopLastPushHead',
|
||||
'rpush' => 'Predis\Commands\ListPushTail',
|
||||
'lpush' => 'Predis\Commands\ListPushHead',
|
||||
'llen' => 'Predis\Commands\ListLength',
|
||||
'lrange' => 'Predis\Commands\ListRange',
|
||||
'ltrim' => 'Predis\Commands\ListTrim',
|
||||
'lindex' => 'Predis\Commands\ListIndex',
|
||||
'lset' => 'Predis\Commands\ListSet',
|
||||
'lrem' => 'Predis\Commands\ListRemove',
|
||||
'lpop' => 'Predis\Commands\ListPopFirst',
|
||||
'rpop' => 'Predis\Commands\ListPopLast',
|
||||
'rpoplpush' => 'Predis\Commands\ListPopLastPushHead',
|
||||
|
||||
/* commands operating on sets */
|
||||
'sadd' => '\Predis\Commands\SetAdd',
|
||||
'srem' => '\Predis\Commands\SetRemove',
|
||||
'spop' => '\Predis\Commands\SetPop',
|
||||
'smove' => '\Predis\Commands\SetMove',
|
||||
'scard' => '\Predis\Commands\SetCardinality',
|
||||
'sismember' => '\Predis\Commands\SetIsMember',
|
||||
'sinter' => '\Predis\Commands\SetIntersection',
|
||||
'sinterstore' => '\Predis\Commands\SetIntersectionStore',
|
||||
'sunion' => '\Predis\Commands\SetUnion',
|
||||
'sunionstore' => '\Predis\Commands\SetUnionStore',
|
||||
'sdiff' => '\Predis\Commands\SetDifference',
|
||||
'sdiffstore' => '\Predis\Commands\SetDifferenceStore',
|
||||
'smembers' => '\Predis\Commands\SetMembers',
|
||||
'srandmember' => '\Predis\Commands\SetRandomMember',
|
||||
'sadd' => 'Predis\Commands\SetAdd',
|
||||
'srem' => 'Predis\Commands\SetRemove',
|
||||
'spop' => 'Predis\Commands\SetPop',
|
||||
'smove' => 'Predis\Commands\SetMove',
|
||||
'scard' => 'Predis\Commands\SetCardinality',
|
||||
'sismember' => 'Predis\Commands\SetIsMember',
|
||||
'sinter' => 'Predis\Commands\SetIntersection',
|
||||
'sinterstore' => 'Predis\Commands\SetIntersectionStore',
|
||||
'sunion' => 'Predis\Commands\SetUnion',
|
||||
'sunionstore' => 'Predis\Commands\SetUnionStore',
|
||||
'sdiff' => 'Predis\Commands\SetDifference',
|
||||
'sdiffstore' => 'Predis\Commands\SetDifferenceStore',
|
||||
'smembers' => 'Predis\Commands\SetMembers',
|
||||
'srandmember' => 'Predis\Commands\SetRandomMember',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'zadd' => '\Predis\Commands\ZSetAdd',
|
||||
'zincrby' => '\Predis\Commands\ZSetIncrementBy',
|
||||
'zrem' => '\Predis\Commands\ZSetRemove',
|
||||
'zrange' => '\Predis\Commands\ZSetRange',
|
||||
'zrevrange' => '\Predis\Commands\ZSetReverseRange',
|
||||
'zrangebyscore' => '\Predis\Commands\ZSetRangeByScore',
|
||||
'zcard' => '\Predis\Commands\ZSetCardinality',
|
||||
'zscore' => '\Predis\Commands\ZSetScore',
|
||||
'zremrangebyscore' => '\Predis\Commands\ZSetRemoveRangeByScore',
|
||||
'zadd' => 'Predis\Commands\ZSetAdd',
|
||||
'zincrby' => 'Predis\Commands\ZSetIncrementBy',
|
||||
'zrem' => 'Predis\Commands\ZSetRemove',
|
||||
'zrange' => 'Predis\Commands\ZSetRange',
|
||||
'zrevrange' => 'Predis\Commands\ZSetReverseRange',
|
||||
'zrangebyscore' => 'Predis\Commands\ZSetRangeByScore',
|
||||
'zcard' => 'Predis\Commands\ZSetCardinality',
|
||||
'zscore' => 'Predis\Commands\ZSetScore',
|
||||
'zremrangebyscore' => 'Predis\Commands\ZSetRemoveRangeByScore',
|
||||
|
||||
/* connection related commands */
|
||||
'ping' => '\Predis\Commands\ConnectionPing',
|
||||
'auth' => '\Predis\Commands\ConnectionAuth',
|
||||
'select' => '\Predis\Commands\ConnectionSelect',
|
||||
'echo' => '\Predis\Commands\ConnectionEcho',
|
||||
'quit' => '\Predis\Commands\ConnectionQuit',
|
||||
'ping' => 'Predis\Commands\ConnectionPing',
|
||||
'auth' => 'Predis\Commands\ConnectionAuth',
|
||||
'select' => 'Predis\Commands\ConnectionSelect',
|
||||
'echo' => 'Predis\Commands\ConnectionEcho',
|
||||
'quit' => 'Predis\Commands\ConnectionQuit',
|
||||
|
||||
/* remote server control commands */
|
||||
'info' => '\Predis\Commands\ServerInfo',
|
||||
'slaveof' => '\Predis\Commands\ServerSlaveOf',
|
||||
'monitor' => '\Predis\Commands\ServerMonitor',
|
||||
'dbsize' => '\Predis\Commands\ServerDatabaseSize',
|
||||
'flushdb' => '\Predis\Commands\ServerFlushDatabase',
|
||||
'flushall' => '\Predis\Commands\ServerFlushAll',
|
||||
'save' => '\Predis\Commands\ServerSave',
|
||||
'bgsave' => '\Predis\Commands\ServerBackgroundSave',
|
||||
'lastsave' => '\Predis\Commands\ServerLastSave',
|
||||
'shutdown' => '\Predis\Commands\ServerShutdown',
|
||||
'bgrewriteaof' => '\Predis\Commands\ServerBackgroundRewriteAOF',
|
||||
'info' => 'Predis\Commands\ServerInfo',
|
||||
'slaveof' => 'Predis\Commands\ServerSlaveOf',
|
||||
'monitor' => 'Predis\Commands\ServerMonitor',
|
||||
'dbsize' => 'Predis\Commands\ServerDatabaseSize',
|
||||
'flushdb' => 'Predis\Commands\ServerFlushDatabase',
|
||||
'flushall' => 'Predis\Commands\ServerFlushAll',
|
||||
'save' => 'Predis\Commands\ServerSave',
|
||||
'bgsave' => 'Predis\Commands\ServerBackgroundSave',
|
||||
'lastsave' => 'Predis\Commands\ServerLastSave',
|
||||
'shutdown' => 'Predis\Commands\ServerShutdown',
|
||||
'bgrewriteaof' => 'Predis\Commands\ServerBackgroundRewriteAOF',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,140 +35,140 @@ class ServerVersion20 extends ServerProfile
|
||||
/* ---------------- Redis 1.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'exists' => '\Predis\Commands\KeyExists',
|
||||
'del' => '\Predis\Commands\KeyDelete',
|
||||
'type' => '\Predis\Commands\KeyType',
|
||||
'keys' => '\Predis\Commands\KeyKeys',
|
||||
'randomkey' => '\Predis\Commands\KeyRandom',
|
||||
'rename' => '\Predis\Commands\KeyRename',
|
||||
'renamenx' => '\Predis\Commands\KeyRenamePreserve',
|
||||
'expire' => '\Predis\Commands\KeyExpire',
|
||||
'expireat' => '\Predis\Commands\KeyExpireAt',
|
||||
'ttl' => '\Predis\Commands\KeyTimeToLive',
|
||||
'move' => '\Predis\Commands\KeyMove',
|
||||
'sort' => '\Predis\Commands\KeySort',
|
||||
'exists' => 'Predis\Commands\KeyExists',
|
||||
'del' => 'Predis\Commands\KeyDelete',
|
||||
'type' => 'Predis\Commands\KeyType',
|
||||
'keys' => 'Predis\Commands\KeyKeys',
|
||||
'randomkey' => 'Predis\Commands\KeyRandom',
|
||||
'rename' => 'Predis\Commands\KeyRename',
|
||||
'renamenx' => 'Predis\Commands\KeyRenamePreserve',
|
||||
'expire' => 'Predis\Commands\KeyExpire',
|
||||
'expireat' => 'Predis\Commands\KeyExpireAt',
|
||||
'ttl' => 'Predis\Commands\KeyTimeToLive',
|
||||
'move' => 'Predis\Commands\KeyMove',
|
||||
'sort' => 'Predis\Commands\KeySort',
|
||||
|
||||
/* commands operating on string values */
|
||||
'set' => '\Predis\Commands\StringSet',
|
||||
'setnx' => '\Predis\Commands\StringSetPreserve',
|
||||
'mset' => '\Predis\Commands\StringSetMultiple',
|
||||
'msetnx' => '\Predis\Commands\StringSetMultiplePreserve',
|
||||
'get' => '\Predis\Commands\StringGet',
|
||||
'mget' => '\Predis\Commands\StringGetMultiple',
|
||||
'getset' => '\Predis\Commands\StringGetSet',
|
||||
'incr' => '\Predis\Commands\StringIncrement',
|
||||
'incrby' => '\Predis\Commands\StringIncrementBy',
|
||||
'decr' => '\Predis\Commands\StringDecrement',
|
||||
'decrby' => '\Predis\Commands\StringDecrementBy',
|
||||
'set' => 'Predis\Commands\StringSet',
|
||||
'setnx' => 'Predis\Commands\StringSetPreserve',
|
||||
'mset' => 'Predis\Commands\StringSetMultiple',
|
||||
'msetnx' => 'Predis\Commands\StringSetMultiplePreserve',
|
||||
'get' => 'Predis\Commands\StringGet',
|
||||
'mget' => 'Predis\Commands\StringGetMultiple',
|
||||
'getset' => 'Predis\Commands\StringGetSet',
|
||||
'incr' => 'Predis\Commands\StringIncrement',
|
||||
'incrby' => 'Predis\Commands\StringIncrementBy',
|
||||
'decr' => 'Predis\Commands\StringDecrement',
|
||||
'decrby' => 'Predis\Commands\StringDecrementBy',
|
||||
|
||||
/* commands operating on lists */
|
||||
'rpush' => '\Predis\Commands\ListPushTail',
|
||||
'lpush' => '\Predis\Commands\ListPushHead',
|
||||
'llen' => '\Predis\Commands\ListLength',
|
||||
'lrange' => '\Predis\Commands\ListRange',
|
||||
'ltrim' => '\Predis\Commands\ListTrim',
|
||||
'lindex' => '\Predis\Commands\ListIndex',
|
||||
'lset' => '\Predis\Commands\ListSet',
|
||||
'lrem' => '\Predis\Commands\ListRemove',
|
||||
'lpop' => '\Predis\Commands\ListPopFirst',
|
||||
'rpop' => '\Predis\Commands\ListPopLast',
|
||||
'rpoplpush' => '\Predis\Commands\ListPopLastPushHead',
|
||||
'rpush' => 'Predis\Commands\ListPushTail',
|
||||
'lpush' => 'Predis\Commands\ListPushHead',
|
||||
'llen' => 'Predis\Commands\ListLength',
|
||||
'lrange' => 'Predis\Commands\ListRange',
|
||||
'ltrim' => 'Predis\Commands\ListTrim',
|
||||
'lindex' => 'Predis\Commands\ListIndex',
|
||||
'lset' => 'Predis\Commands\ListSet',
|
||||
'lrem' => 'Predis\Commands\ListRemove',
|
||||
'lpop' => 'Predis\Commands\ListPopFirst',
|
||||
'rpop' => 'Predis\Commands\ListPopLast',
|
||||
'rpoplpush' => 'Predis\Commands\ListPopLastPushHead',
|
||||
|
||||
/* commands operating on sets */
|
||||
'sadd' => '\Predis\Commands\SetAdd',
|
||||
'srem' => '\Predis\Commands\SetRemove',
|
||||
'spop' => '\Predis\Commands\SetPop',
|
||||
'smove' => '\Predis\Commands\SetMove',
|
||||
'scard' => '\Predis\Commands\SetCardinality',
|
||||
'sismember' => '\Predis\Commands\SetIsMember',
|
||||
'sinter' => '\Predis\Commands\SetIntersection',
|
||||
'sinterstore' => '\Predis\Commands\SetIntersectionStore',
|
||||
'sunion' => '\Predis\Commands\SetUnion',
|
||||
'sunionstore' => '\Predis\Commands\SetUnionStore',
|
||||
'sdiff' => '\Predis\Commands\SetDifference',
|
||||
'sdiffstore' => '\Predis\Commands\SetDifferenceStore',
|
||||
'smembers' => '\Predis\Commands\SetMembers',
|
||||
'srandmember' => '\Predis\Commands\SetRandomMember',
|
||||
'sadd' => 'Predis\Commands\SetAdd',
|
||||
'srem' => 'Predis\Commands\SetRemove',
|
||||
'spop' => 'Predis\Commands\SetPop',
|
||||
'smove' => 'Predis\Commands\SetMove',
|
||||
'scard' => 'Predis\Commands\SetCardinality',
|
||||
'sismember' => 'Predis\Commands\SetIsMember',
|
||||
'sinter' => 'Predis\Commands\SetIntersection',
|
||||
'sinterstore' => 'Predis\Commands\SetIntersectionStore',
|
||||
'sunion' => 'Predis\Commands\SetUnion',
|
||||
'sunionstore' => 'Predis\Commands\SetUnionStore',
|
||||
'sdiff' => 'Predis\Commands\SetDifference',
|
||||
'sdiffstore' => 'Predis\Commands\SetDifferenceStore',
|
||||
'smembers' => 'Predis\Commands\SetMembers',
|
||||
'srandmember' => 'Predis\Commands\SetRandomMember',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'zadd' => '\Predis\Commands\ZSetAdd',
|
||||
'zincrby' => '\Predis\Commands\ZSetIncrementBy',
|
||||
'zrem' => '\Predis\Commands\ZSetRemove',
|
||||
'zrange' => '\Predis\Commands\ZSetRange',
|
||||
'zrevrange' => '\Predis\Commands\ZSetReverseRange',
|
||||
'zrangebyscore' => '\Predis\Commands\ZSetRangeByScore',
|
||||
'zcard' => '\Predis\Commands\ZSetCardinality',
|
||||
'zscore' => '\Predis\Commands\ZSetScore',
|
||||
'zremrangebyscore' => '\Predis\Commands\ZSetRemoveRangeByScore',
|
||||
'zadd' => 'Predis\Commands\ZSetAdd',
|
||||
'zincrby' => 'Predis\Commands\ZSetIncrementBy',
|
||||
'zrem' => 'Predis\Commands\ZSetRemove',
|
||||
'zrange' => 'Predis\Commands\ZSetRange',
|
||||
'zrevrange' => 'Predis\Commands\ZSetReverseRange',
|
||||
'zrangebyscore' => 'Predis\Commands\ZSetRangeByScore',
|
||||
'zcard' => 'Predis\Commands\ZSetCardinality',
|
||||
'zscore' => 'Predis\Commands\ZSetScore',
|
||||
'zremrangebyscore' => 'Predis\Commands\ZSetRemoveRangeByScore',
|
||||
|
||||
/* connection related commands */
|
||||
'ping' => '\Predis\Commands\ConnectionPing',
|
||||
'auth' => '\Predis\Commands\ConnectionAuth',
|
||||
'select' => '\Predis\Commands\ConnectionSelect',
|
||||
'echo' => '\Predis\Commands\ConnectionEcho',
|
||||
'quit' => '\Predis\Commands\ConnectionQuit',
|
||||
'ping' => 'Predis\Commands\ConnectionPing',
|
||||
'auth' => 'Predis\Commands\ConnectionAuth',
|
||||
'select' => 'Predis\Commands\ConnectionSelect',
|
||||
'echo' => 'Predis\Commands\ConnectionEcho',
|
||||
'quit' => 'Predis\Commands\ConnectionQuit',
|
||||
|
||||
/* remote server control commands */
|
||||
'info' => '\Predis\Commands\ServerInfo',
|
||||
'slaveof' => '\Predis\Commands\ServerSlaveOf',
|
||||
'monitor' => '\Predis\Commands\ServerMonitor',
|
||||
'dbsize' => '\Predis\Commands\ServerDatabaseSize',
|
||||
'flushdb' => '\Predis\Commands\ServerFlushDatabase',
|
||||
'flushall' => '\Predis\Commands\ServerFlushAll',
|
||||
'save' => '\Predis\Commands\ServerSave',
|
||||
'bgsave' => '\Predis\Commands\ServerBackgroundSave',
|
||||
'lastsave' => '\Predis\Commands\ServerLastSave',
|
||||
'shutdown' => '\Predis\Commands\ServerShutdown',
|
||||
'bgrewriteaof' => '\Predis\Commands\ServerBackgroundRewriteAOF',
|
||||
'info' => 'Predis\Commands\ServerInfo',
|
||||
'slaveof' => 'Predis\Commands\ServerSlaveOf',
|
||||
'monitor' => 'Predis\Commands\ServerMonitor',
|
||||
'dbsize' => 'Predis\Commands\ServerDatabaseSize',
|
||||
'flushdb' => 'Predis\Commands\ServerFlushDatabase',
|
||||
'flushall' => 'Predis\Commands\ServerFlushAll',
|
||||
'save' => 'Predis\Commands\ServerSave',
|
||||
'bgsave' => 'Predis\Commands\ServerBackgroundSave',
|
||||
'lastsave' => 'Predis\Commands\ServerLastSave',
|
||||
'shutdown' => 'Predis\Commands\ServerShutdown',
|
||||
'bgrewriteaof' => 'Predis\Commands\ServerBackgroundRewriteAOF',
|
||||
|
||||
|
||||
/* ---------------- Redis 2.0 ---------------- */
|
||||
|
||||
/* commands operating on string values */
|
||||
'setex' => '\Predis\Commands\StringSetExpire',
|
||||
'append' => '\Predis\Commands\StringAppend',
|
||||
'substr' => '\Predis\Commands\StringSubstr',
|
||||
'setex' => 'Predis\Commands\StringSetExpire',
|
||||
'append' => 'Predis\Commands\StringAppend',
|
||||
'substr' => 'Predis\Commands\StringSubstr',
|
||||
|
||||
/* commands operating on lists */
|
||||
'blpop' => '\Predis\Commands\ListPopFirstBlocking',
|
||||
'brpop' => '\Predis\Commands\ListPopLastBlocking',
|
||||
'blpop' => 'Predis\Commands\ListPopFirstBlocking',
|
||||
'brpop' => 'Predis\Commands\ListPopLastBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'zunionstore' => '\Predis\Commands\ZSetUnionStore',
|
||||
'zinterstore' => '\Predis\Commands\ZSetIntersectionStore',
|
||||
'zcount' => '\Predis\Commands\ZSetCount',
|
||||
'zrank' => '\Predis\Commands\ZSetRank',
|
||||
'zrevrank' => '\Predis\Commands\ZSetReverseRank',
|
||||
'zremrangebyrank' => '\Predis\Commands\ZSetRemoveRangeByRank',
|
||||
'zunionstore' => 'Predis\Commands\ZSetUnionStore',
|
||||
'zinterstore' => 'Predis\Commands\ZSetIntersectionStore',
|
||||
'zcount' => 'Predis\Commands\ZSetCount',
|
||||
'zrank' => 'Predis\Commands\ZSetRank',
|
||||
'zrevrank' => 'Predis\Commands\ZSetReverseRank',
|
||||
'zremrangebyrank' => 'Predis\Commands\ZSetRemoveRangeByRank',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'hset' => '\Predis\Commands\HashSet',
|
||||
'hsetnx' => '\Predis\Commands\HashSetPreserve',
|
||||
'hmset' => '\Predis\Commands\HashSetMultiple',
|
||||
'hincrby' => '\Predis\Commands\HashIncrementBy',
|
||||
'hget' => '\Predis\Commands\HashGet',
|
||||
'hmget' => '\Predis\Commands\HashGetMultiple',
|
||||
'hdel' => '\Predis\Commands\HashDelete',
|
||||
'hexists' => '\Predis\Commands\HashExists',
|
||||
'hlen' => '\Predis\Commands\HashLength',
|
||||
'hkeys' => '\Predis\Commands\HashKeys',
|
||||
'hvals' => '\Predis\Commands\HashValues',
|
||||
'hgetall' => '\Predis\Commands\HashGetAll',
|
||||
'hset' => 'Predis\Commands\HashSet',
|
||||
'hsetnx' => 'Predis\Commands\HashSetPreserve',
|
||||
'hmset' => 'Predis\Commands\HashSetMultiple',
|
||||
'hincrby' => 'Predis\Commands\HashIncrementBy',
|
||||
'hget' => 'Predis\Commands\HashGet',
|
||||
'hmget' => 'Predis\Commands\HashGetMultiple',
|
||||
'hdel' => 'Predis\Commands\HashDelete',
|
||||
'hexists' => 'Predis\Commands\HashExists',
|
||||
'hlen' => 'Predis\Commands\HashLength',
|
||||
'hkeys' => 'Predis\Commands\HashKeys',
|
||||
'hvals' => 'Predis\Commands\HashValues',
|
||||
'hgetall' => 'Predis\Commands\HashGetAll',
|
||||
|
||||
/* transactions */
|
||||
'multi' => '\Predis\Commands\TransactionMulti',
|
||||
'exec' => '\Predis\Commands\TransactionExec',
|
||||
'discard' => '\Predis\Commands\TransactionDiscard',
|
||||
'multi' => 'Predis\Commands\TransactionMulti',
|
||||
'exec' => 'Predis\Commands\TransactionExec',
|
||||
'discard' => 'Predis\Commands\TransactionDiscard',
|
||||
|
||||
/* publish - subscribe */
|
||||
'subscribe' => '\Predis\Commands\PubSubSubscribe',
|
||||
'unsubscribe' => '\Predis\Commands\PubSubUnsubscribe',
|
||||
'psubscribe' => '\Predis\Commands\PubSubSubscribeByPattern',
|
||||
'punsubscribe' => '\Predis\Commands\PubSubUnsubscribeByPattern',
|
||||
'publish' => '\Predis\Commands\PubSubPublish',
|
||||
'subscribe' => 'Predis\Commands\PubSubSubscribe',
|
||||
'unsubscribe' => 'Predis\Commands\PubSubUnsubscribe',
|
||||
'psubscribe' => 'Predis\Commands\PubSubSubscribeByPattern',
|
||||
'punsubscribe' => 'Predis\Commands\PubSubUnsubscribeByPattern',
|
||||
'publish' => 'Predis\Commands\PubSubPublish',
|
||||
|
||||
/* remote server control commands */
|
||||
'config' => '\Predis\Commands\ServerConfig',
|
||||
'config' => 'Predis\Commands\ServerConfig',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,170 +35,170 @@ class ServerVersion22 extends ServerProfile
|
||||
/* ---------------- Redis 1.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'exists' => '\Predis\Commands\KeyExists',
|
||||
'del' => '\Predis\Commands\KeyDelete',
|
||||
'type' => '\Predis\Commands\KeyType',
|
||||
'keys' => '\Predis\Commands\KeyKeys',
|
||||
'randomkey' => '\Predis\Commands\KeyRandom',
|
||||
'rename' => '\Predis\Commands\KeyRename',
|
||||
'renamenx' => '\Predis\Commands\KeyRenamePreserve',
|
||||
'expire' => '\Predis\Commands\KeyExpire',
|
||||
'expireat' => '\Predis\Commands\KeyExpireAt',
|
||||
'ttl' => '\Predis\Commands\KeyTimeToLive',
|
||||
'move' => '\Predis\Commands\KeyMove',
|
||||
'sort' => '\Predis\Commands\KeySort',
|
||||
'exists' => 'Predis\Commands\KeyExists',
|
||||
'del' => 'Predis\Commands\KeyDelete',
|
||||
'type' => 'Predis\Commands\KeyType',
|
||||
'keys' => 'Predis\Commands\KeyKeys',
|
||||
'randomkey' => 'Predis\Commands\KeyRandom',
|
||||
'rename' => 'Predis\Commands\KeyRename',
|
||||
'renamenx' => 'Predis\Commands\KeyRenamePreserve',
|
||||
'expire' => 'Predis\Commands\KeyExpire',
|
||||
'expireat' => 'Predis\Commands\KeyExpireAt',
|
||||
'ttl' => 'Predis\Commands\KeyTimeToLive',
|
||||
'move' => 'Predis\Commands\KeyMove',
|
||||
'sort' => 'Predis\Commands\KeySort',
|
||||
|
||||
/* commands operating on string values */
|
||||
'set' => '\Predis\Commands\StringSet',
|
||||
'setnx' => '\Predis\Commands\StringSetPreserve',
|
||||
'mset' => '\Predis\Commands\StringSetMultiple',
|
||||
'msetnx' => '\Predis\Commands\StringSetMultiplePreserve',
|
||||
'get' => '\Predis\Commands\StringGet',
|
||||
'mget' => '\Predis\Commands\StringGetMultiple',
|
||||
'getset' => '\Predis\Commands\StringGetSet',
|
||||
'incr' => '\Predis\Commands\StringIncrement',
|
||||
'incrby' => '\Predis\Commands\StringIncrementBy',
|
||||
'decr' => '\Predis\Commands\StringDecrement',
|
||||
'decrby' => '\Predis\Commands\StringDecrementBy',
|
||||
'set' => 'Predis\Commands\StringSet',
|
||||
'setnx' => 'Predis\Commands\StringSetPreserve',
|
||||
'mset' => 'Predis\Commands\StringSetMultiple',
|
||||
'msetnx' => 'Predis\Commands\StringSetMultiplePreserve',
|
||||
'get' => 'Predis\Commands\StringGet',
|
||||
'mget' => 'Predis\Commands\StringGetMultiple',
|
||||
'getset' => 'Predis\Commands\StringGetSet',
|
||||
'incr' => 'Predis\Commands\StringIncrement',
|
||||
'incrby' => 'Predis\Commands\StringIncrementBy',
|
||||
'decr' => 'Predis\Commands\StringDecrement',
|
||||
'decrby' => 'Predis\Commands\StringDecrementBy',
|
||||
|
||||
/* commands operating on lists */
|
||||
'rpush' => '\Predis\Commands\ListPushTail',
|
||||
'lpush' => '\Predis\Commands\ListPushHead',
|
||||
'llen' => '\Predis\Commands\ListLength',
|
||||
'lrange' => '\Predis\Commands\ListRange',
|
||||
'ltrim' => '\Predis\Commands\ListTrim',
|
||||
'lindex' => '\Predis\Commands\ListIndex',
|
||||
'lset' => '\Predis\Commands\ListSet',
|
||||
'lrem' => '\Predis\Commands\ListRemove',
|
||||
'lpop' => '\Predis\Commands\ListPopFirst',
|
||||
'rpop' => '\Predis\Commands\ListPopLast',
|
||||
'rpoplpush' => '\Predis\Commands\ListPopLastPushHead',
|
||||
'rpush' => 'Predis\Commands\ListPushTail',
|
||||
'lpush' => 'Predis\Commands\ListPushHead',
|
||||
'llen' => 'Predis\Commands\ListLength',
|
||||
'lrange' => 'Predis\Commands\ListRange',
|
||||
'ltrim' => 'Predis\Commands\ListTrim',
|
||||
'lindex' => 'Predis\Commands\ListIndex',
|
||||
'lset' => 'Predis\Commands\ListSet',
|
||||
'lrem' => 'Predis\Commands\ListRemove',
|
||||
'lpop' => 'Predis\Commands\ListPopFirst',
|
||||
'rpop' => 'Predis\Commands\ListPopLast',
|
||||
'rpoplpush' => 'Predis\Commands\ListPopLastPushHead',
|
||||
|
||||
/* commands operating on sets */
|
||||
'sadd' => '\Predis\Commands\SetAdd',
|
||||
'srem' => '\Predis\Commands\SetRemove',
|
||||
'spop' => '\Predis\Commands\SetPop',
|
||||
'smove' => '\Predis\Commands\SetMove',
|
||||
'scard' => '\Predis\Commands\SetCardinality',
|
||||
'sismember' => '\Predis\Commands\SetIsMember',
|
||||
'sinter' => '\Predis\Commands\SetIntersection',
|
||||
'sinterstore' => '\Predis\Commands\SetIntersectionStore',
|
||||
'sunion' => '\Predis\Commands\SetUnion',
|
||||
'sunionstore' => '\Predis\Commands\SetUnionStore',
|
||||
'sdiff' => '\Predis\Commands\SetDifference',
|
||||
'sdiffstore' => '\Predis\Commands\SetDifferenceStore',
|
||||
'smembers' => '\Predis\Commands\SetMembers',
|
||||
'srandmember' => '\Predis\Commands\SetRandomMember',
|
||||
'sadd' => 'Predis\Commands\SetAdd',
|
||||
'srem' => 'Predis\Commands\SetRemove',
|
||||
'spop' => 'Predis\Commands\SetPop',
|
||||
'smove' => 'Predis\Commands\SetMove',
|
||||
'scard' => 'Predis\Commands\SetCardinality',
|
||||
'sismember' => 'Predis\Commands\SetIsMember',
|
||||
'sinter' => 'Predis\Commands\SetIntersection',
|
||||
'sinterstore' => 'Predis\Commands\SetIntersectionStore',
|
||||
'sunion' => 'Predis\Commands\SetUnion',
|
||||
'sunionstore' => 'Predis\Commands\SetUnionStore',
|
||||
'sdiff' => 'Predis\Commands\SetDifference',
|
||||
'sdiffstore' => 'Predis\Commands\SetDifferenceStore',
|
||||
'smembers' => 'Predis\Commands\SetMembers',
|
||||
'srandmember' => 'Predis\Commands\SetRandomMember',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'zadd' => '\Predis\Commands\ZSetAdd',
|
||||
'zincrby' => '\Predis\Commands\ZSetIncrementBy',
|
||||
'zrem' => '\Predis\Commands\ZSetRemove',
|
||||
'zrange' => '\Predis\Commands\ZSetRange',
|
||||
'zrevrange' => '\Predis\Commands\ZSetReverseRange',
|
||||
'zrangebyscore' => '\Predis\Commands\ZSetRangeByScore',
|
||||
'zcard' => '\Predis\Commands\ZSetCardinality',
|
||||
'zscore' => '\Predis\Commands\ZSetScore',
|
||||
'zremrangebyscore' => '\Predis\Commands\ZSetRemoveRangeByScore',
|
||||
'zadd' => 'Predis\Commands\ZSetAdd',
|
||||
'zincrby' => 'Predis\Commands\ZSetIncrementBy',
|
||||
'zrem' => 'Predis\Commands\ZSetRemove',
|
||||
'zrange' => 'Predis\Commands\ZSetRange',
|
||||
'zrevrange' => 'Predis\Commands\ZSetReverseRange',
|
||||
'zrangebyscore' => 'Predis\Commands\ZSetRangeByScore',
|
||||
'zcard' => 'Predis\Commands\ZSetCardinality',
|
||||
'zscore' => 'Predis\Commands\ZSetScore',
|
||||
'zremrangebyscore' => 'Predis\Commands\ZSetRemoveRangeByScore',
|
||||
|
||||
/* connection related commands */
|
||||
'ping' => '\Predis\Commands\ConnectionPing',
|
||||
'auth' => '\Predis\Commands\ConnectionAuth',
|
||||
'select' => '\Predis\Commands\ConnectionSelect',
|
||||
'echo' => '\Predis\Commands\ConnectionEcho',
|
||||
'quit' => '\Predis\Commands\ConnectionQuit',
|
||||
'ping' => 'Predis\Commands\ConnectionPing',
|
||||
'auth' => 'Predis\Commands\ConnectionAuth',
|
||||
'select' => 'Predis\Commands\ConnectionSelect',
|
||||
'echo' => 'Predis\Commands\ConnectionEcho',
|
||||
'quit' => 'Predis\Commands\ConnectionQuit',
|
||||
|
||||
/* remote server control commands */
|
||||
'info' => '\Predis\Commands\ServerInfo',
|
||||
'slaveof' => '\Predis\Commands\ServerSlaveOf',
|
||||
'monitor' => '\Predis\Commands\ServerMonitor',
|
||||
'dbsize' => '\Predis\Commands\ServerDatabaseSize',
|
||||
'flushdb' => '\Predis\Commands\ServerFlushDatabase',
|
||||
'flushall' => '\Predis\Commands\ServerFlushAll',
|
||||
'save' => '\Predis\Commands\ServerSave',
|
||||
'bgsave' => '\Predis\Commands\ServerBackgroundSave',
|
||||
'lastsave' => '\Predis\Commands\ServerLastSave',
|
||||
'shutdown' => '\Predis\Commands\ServerShutdown',
|
||||
'bgrewriteaof' => '\Predis\Commands\ServerBackgroundRewriteAOF',
|
||||
'info' => 'Predis\Commands\ServerInfo',
|
||||
'slaveof' => 'Predis\Commands\ServerSlaveOf',
|
||||
'monitor' => 'Predis\Commands\ServerMonitor',
|
||||
'dbsize' => 'Predis\Commands\ServerDatabaseSize',
|
||||
'flushdb' => 'Predis\Commands\ServerFlushDatabase',
|
||||
'flushall' => 'Predis\Commands\ServerFlushAll',
|
||||
'save' => 'Predis\Commands\ServerSave',
|
||||
'bgsave' => 'Predis\Commands\ServerBackgroundSave',
|
||||
'lastsave' => 'Predis\Commands\ServerLastSave',
|
||||
'shutdown' => 'Predis\Commands\ServerShutdown',
|
||||
'bgrewriteaof' => 'Predis\Commands\ServerBackgroundRewriteAOF',
|
||||
|
||||
|
||||
/* ---------------- Redis 2.0 ---------------- */
|
||||
|
||||
/* commands operating on string values */
|
||||
'setex' => '\Predis\Commands\StringSetExpire',
|
||||
'append' => '\Predis\Commands\StringAppend',
|
||||
'substr' => '\Predis\Commands\StringSubstr',
|
||||
'setex' => 'Predis\Commands\StringSetExpire',
|
||||
'append' => 'Predis\Commands\StringAppend',
|
||||
'substr' => 'Predis\Commands\StringSubstr',
|
||||
|
||||
/* commands operating on lists */
|
||||
'blpop' => '\Predis\Commands\ListPopFirstBlocking',
|
||||
'brpop' => '\Predis\Commands\ListPopLastBlocking',
|
||||
'blpop' => 'Predis\Commands\ListPopFirstBlocking',
|
||||
'brpop' => 'Predis\Commands\ListPopLastBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'zunionstore' => '\Predis\Commands\ZSetUnionStore',
|
||||
'zinterstore' => '\Predis\Commands\ZSetIntersectionStore',
|
||||
'zcount' => '\Predis\Commands\ZSetCount',
|
||||
'zrank' => '\Predis\Commands\ZSetRank',
|
||||
'zrevrank' => '\Predis\Commands\ZSetReverseRank',
|
||||
'zremrangebyrank' => '\Predis\Commands\ZSetRemoveRangeByRank',
|
||||
'zunionstore' => 'Predis\Commands\ZSetUnionStore',
|
||||
'zinterstore' => 'Predis\Commands\ZSetIntersectionStore',
|
||||
'zcount' => 'Predis\Commands\ZSetCount',
|
||||
'zrank' => 'Predis\Commands\ZSetRank',
|
||||
'zrevrank' => 'Predis\Commands\ZSetReverseRank',
|
||||
'zremrangebyrank' => 'Predis\Commands\ZSetRemoveRangeByRank',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'hset' => '\Predis\Commands\HashSet',
|
||||
'hsetnx' => '\Predis\Commands\HashSetPreserve',
|
||||
'hmset' => '\Predis\Commands\HashSetMultiple',
|
||||
'hincrby' => '\Predis\Commands\HashIncrementBy',
|
||||
'hget' => '\Predis\Commands\HashGet',
|
||||
'hmget' => '\Predis\Commands\HashGetMultiple',
|
||||
'hdel' => '\Predis\Commands\HashDelete',
|
||||
'hexists' => '\Predis\Commands\HashExists',
|
||||
'hlen' => '\Predis\Commands\HashLength',
|
||||
'hkeys' => '\Predis\Commands\HashKeys',
|
||||
'hvals' => '\Predis\Commands\HashValues',
|
||||
'hgetall' => '\Predis\Commands\HashGetAll',
|
||||
'hset' => 'Predis\Commands\HashSet',
|
||||
'hsetnx' => 'Predis\Commands\HashSetPreserve',
|
||||
'hmset' => 'Predis\Commands\HashSetMultiple',
|
||||
'hincrby' => 'Predis\Commands\HashIncrementBy',
|
||||
'hget' => 'Predis\Commands\HashGet',
|
||||
'hmget' => 'Predis\Commands\HashGetMultiple',
|
||||
'hdel' => 'Predis\Commands\HashDelete',
|
||||
'hexists' => 'Predis\Commands\HashExists',
|
||||
'hlen' => 'Predis\Commands\HashLength',
|
||||
'hkeys' => 'Predis\Commands\HashKeys',
|
||||
'hvals' => 'Predis\Commands\HashValues',
|
||||
'hgetall' => 'Predis\Commands\HashGetAll',
|
||||
|
||||
/* transactions */
|
||||
'multi' => '\Predis\Commands\TransactionMulti',
|
||||
'exec' => '\Predis\Commands\TransactionExec',
|
||||
'discard' => '\Predis\Commands\TransactionDiscard',
|
||||
'multi' => 'Predis\Commands\TransactionMulti',
|
||||
'exec' => 'Predis\Commands\TransactionExec',
|
||||
'discard' => 'Predis\Commands\TransactionDiscard',
|
||||
|
||||
/* publish - subscribe */
|
||||
'subscribe' => '\Predis\Commands\PubSubSubscribe',
|
||||
'unsubscribe' => '\Predis\Commands\PubSubUnsubscribe',
|
||||
'psubscribe' => '\Predis\Commands\PubSubSubscribeByPattern',
|
||||
'punsubscribe' => '\Predis\Commands\PubSubUnsubscribeByPattern',
|
||||
'publish' => '\Predis\Commands\PubSubPublish',
|
||||
'subscribe' => 'Predis\Commands\PubSubSubscribe',
|
||||
'unsubscribe' => 'Predis\Commands\PubSubUnsubscribe',
|
||||
'psubscribe' => 'Predis\Commands\PubSubSubscribeByPattern',
|
||||
'punsubscribe' => 'Predis\Commands\PubSubUnsubscribeByPattern',
|
||||
'publish' => 'Predis\Commands\PubSubPublish',
|
||||
|
||||
/* remote server control commands */
|
||||
'config' => '\Predis\Commands\ServerConfig',
|
||||
'config' => 'Predis\Commands\ServerConfig',
|
||||
|
||||
|
||||
/* ---------------- Redis 2.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'persist' => '\Predis\Commands\KeyPersist',
|
||||
'persist' => 'Predis\Commands\KeyPersist',
|
||||
|
||||
/* commands operating on string values */
|
||||
'strlen' => '\Predis\Commands\StringStrlen',
|
||||
'setrange' => '\Predis\Commands\StringSetRange',
|
||||
'getrange' => '\Predis\Commands\StringGetRange',
|
||||
'setbit' => '\Predis\Commands\StringSetBit',
|
||||
'getbit' => '\Predis\Commands\StringGetBit',
|
||||
'strlen' => 'Predis\Commands\StringStrlen',
|
||||
'setrange' => 'Predis\Commands\StringSetRange',
|
||||
'getrange' => 'Predis\Commands\StringGetRange',
|
||||
'setbit' => 'Predis\Commands\StringSetBit',
|
||||
'getbit' => 'Predis\Commands\StringGetBit',
|
||||
|
||||
/* commands operating on lists */
|
||||
'rpushx' => '\Predis\Commands\ListPushTailX',
|
||||
'lpushx' => '\Predis\Commands\ListPushHeadX',
|
||||
'linsert' => '\Predis\Commands\ListInsert',
|
||||
'brpoplpush' => '\Predis\Commands\ListPopLastPushHeadBlocking',
|
||||
'rpushx' => 'Predis\Commands\ListPushTailX',
|
||||
'lpushx' => 'Predis\Commands\ListPushHeadX',
|
||||
'linsert' => 'Predis\Commands\ListInsert',
|
||||
'brpoplpush' => 'Predis\Commands\ListPopLastPushHeadBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'zrevrangebyscore' => '\Predis\Commands\ZSetReverseRangeByScore',
|
||||
'zrevrangebyscore' => 'Predis\Commands\ZSetReverseRangeByScore',
|
||||
|
||||
/* transactions */
|
||||
'watch' => '\Predis\Commands\TransactionWatch',
|
||||
'unwatch' => '\Predis\Commands\TransactionUnwatch',
|
||||
'watch' => 'Predis\Commands\TransactionWatch',
|
||||
'unwatch' => 'Predis\Commands\TransactionUnwatch',
|
||||
|
||||
/* remote server control commands */
|
||||
'object' => '\Predis\Commands\ServerObject',
|
||||
'slowlog' => '\Predis\Commands\ServerSlowlog',
|
||||
'object' => 'Predis\Commands\ServerObject',
|
||||
'slowlog' => 'Predis\Commands\ServerSlowlog',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,176 +35,176 @@ class ServerVersion24 extends ServerProfile
|
||||
/* ---------------- Redis 1.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'exists' => '\Predis\Commands\KeyExists',
|
||||
'del' => '\Predis\Commands\KeyDelete',
|
||||
'type' => '\Predis\Commands\KeyType',
|
||||
'keys' => '\Predis\Commands\KeyKeys',
|
||||
'randomkey' => '\Predis\Commands\KeyRandom',
|
||||
'rename' => '\Predis\Commands\KeyRename',
|
||||
'renamenx' => '\Predis\Commands\KeyRenamePreserve',
|
||||
'expire' => '\Predis\Commands\KeyExpire',
|
||||
'expireat' => '\Predis\Commands\KeyExpireAt',
|
||||
'ttl' => '\Predis\Commands\KeyTimeToLive',
|
||||
'move' => '\Predis\Commands\KeyMove',
|
||||
'sort' => '\Predis\Commands\KeySort',
|
||||
'exists' => 'Predis\Commands\KeyExists',
|
||||
'del' => 'Predis\Commands\KeyDelete',
|
||||
'type' => 'Predis\Commands\KeyType',
|
||||
'keys' => 'Predis\Commands\KeyKeys',
|
||||
'randomkey' => 'Predis\Commands\KeyRandom',
|
||||
'rename' => 'Predis\Commands\KeyRename',
|
||||
'renamenx' => 'Predis\Commands\KeyRenamePreserve',
|
||||
'expire' => 'Predis\Commands\KeyExpire',
|
||||
'expireat' => 'Predis\Commands\KeyExpireAt',
|
||||
'ttl' => 'Predis\Commands\KeyTimeToLive',
|
||||
'move' => 'Predis\Commands\KeyMove',
|
||||
'sort' => 'Predis\Commands\KeySort',
|
||||
|
||||
/* commands operating on string values */
|
||||
'set' => '\Predis\Commands\StringSet',
|
||||
'setnx' => '\Predis\Commands\StringSetPreserve',
|
||||
'mset' => '\Predis\Commands\StringSetMultiple',
|
||||
'msetnx' => '\Predis\Commands\StringSetMultiplePreserve',
|
||||
'get' => '\Predis\Commands\StringGet',
|
||||
'mget' => '\Predis\Commands\StringGetMultiple',
|
||||
'getset' => '\Predis\Commands\StringGetSet',
|
||||
'incr' => '\Predis\Commands\StringIncrement',
|
||||
'incrby' => '\Predis\Commands\StringIncrementBy',
|
||||
'decr' => '\Predis\Commands\StringDecrement',
|
||||
'decrby' => '\Predis\Commands\StringDecrementBy',
|
||||
'set' => 'Predis\Commands\StringSet',
|
||||
'setnx' => 'Predis\Commands\StringSetPreserve',
|
||||
'mset' => 'Predis\Commands\StringSetMultiple',
|
||||
'msetnx' => 'Predis\Commands\StringSetMultiplePreserve',
|
||||
'get' => 'Predis\Commands\StringGet',
|
||||
'mget' => 'Predis\Commands\StringGetMultiple',
|
||||
'getset' => 'Predis\Commands\StringGetSet',
|
||||
'incr' => 'Predis\Commands\StringIncrement',
|
||||
'incrby' => 'Predis\Commands\StringIncrementBy',
|
||||
'decr' => 'Predis\Commands\StringDecrement',
|
||||
'decrby' => 'Predis\Commands\StringDecrementBy',
|
||||
|
||||
/* commands operating on lists */
|
||||
'rpush' => '\Predis\Commands\ListPushTail',
|
||||
'lpush' => '\Predis\Commands\ListPushHead',
|
||||
'llen' => '\Predis\Commands\ListLength',
|
||||
'lrange' => '\Predis\Commands\ListRange',
|
||||
'ltrim' => '\Predis\Commands\ListTrim',
|
||||
'lindex' => '\Predis\Commands\ListIndex',
|
||||
'lset' => '\Predis\Commands\ListSet',
|
||||
'lrem' => '\Predis\Commands\ListRemove',
|
||||
'lpop' => '\Predis\Commands\ListPopFirst',
|
||||
'rpop' => '\Predis\Commands\ListPopLast',
|
||||
'rpoplpush' => '\Predis\Commands\ListPopLastPushHead',
|
||||
'rpush' => 'Predis\Commands\ListPushTail',
|
||||
'lpush' => 'Predis\Commands\ListPushHead',
|
||||
'llen' => 'Predis\Commands\ListLength',
|
||||
'lrange' => 'Predis\Commands\ListRange',
|
||||
'ltrim' => 'Predis\Commands\ListTrim',
|
||||
'lindex' => 'Predis\Commands\ListIndex',
|
||||
'lset' => 'Predis\Commands\ListSet',
|
||||
'lrem' => 'Predis\Commands\ListRemove',
|
||||
'lpop' => 'Predis\Commands\ListPopFirst',
|
||||
'rpop' => 'Predis\Commands\ListPopLast',
|
||||
'rpoplpush' => 'Predis\Commands\ListPopLastPushHead',
|
||||
|
||||
/* commands operating on sets */
|
||||
'sadd' => '\Predis\Commands\SetAdd',
|
||||
'srem' => '\Predis\Commands\SetRemove',
|
||||
'spop' => '\Predis\Commands\SetPop',
|
||||
'smove' => '\Predis\Commands\SetMove',
|
||||
'scard' => '\Predis\Commands\SetCardinality',
|
||||
'sismember' => '\Predis\Commands\SetIsMember',
|
||||
'sinter' => '\Predis\Commands\SetIntersection',
|
||||
'sinterstore' => '\Predis\Commands\SetIntersectionStore',
|
||||
'sunion' => '\Predis\Commands\SetUnion',
|
||||
'sunionstore' => '\Predis\Commands\SetUnionStore',
|
||||
'sdiff' => '\Predis\Commands\SetDifference',
|
||||
'sdiffstore' => '\Predis\Commands\SetDifferenceStore',
|
||||
'smembers' => '\Predis\Commands\SetMembers',
|
||||
'srandmember' => '\Predis\Commands\SetRandomMember',
|
||||
'sadd' => 'Predis\Commands\SetAdd',
|
||||
'srem' => 'Predis\Commands\SetRemove',
|
||||
'spop' => 'Predis\Commands\SetPop',
|
||||
'smove' => 'Predis\Commands\SetMove',
|
||||
'scard' => 'Predis\Commands\SetCardinality',
|
||||
'sismember' => 'Predis\Commands\SetIsMember',
|
||||
'sinter' => 'Predis\Commands\SetIntersection',
|
||||
'sinterstore' => 'Predis\Commands\SetIntersectionStore',
|
||||
'sunion' => 'Predis\Commands\SetUnion',
|
||||
'sunionstore' => 'Predis\Commands\SetUnionStore',
|
||||
'sdiff' => 'Predis\Commands\SetDifference',
|
||||
'sdiffstore' => 'Predis\Commands\SetDifferenceStore',
|
||||
'smembers' => 'Predis\Commands\SetMembers',
|
||||
'srandmember' => 'Predis\Commands\SetRandomMember',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'zadd' => '\Predis\Commands\ZSetAdd',
|
||||
'zincrby' => '\Predis\Commands\ZSetIncrementBy',
|
||||
'zrem' => '\Predis\Commands\ZSetRemove',
|
||||
'zrange' => '\Predis\Commands\ZSetRange',
|
||||
'zrevrange' => '\Predis\Commands\ZSetReverseRange',
|
||||
'zrangebyscore' => '\Predis\Commands\ZSetRangeByScore',
|
||||
'zcard' => '\Predis\Commands\ZSetCardinality',
|
||||
'zscore' => '\Predis\Commands\ZSetScore',
|
||||
'zremrangebyscore' => '\Predis\Commands\ZSetRemoveRangeByScore',
|
||||
'zadd' => 'Predis\Commands\ZSetAdd',
|
||||
'zincrby' => 'Predis\Commands\ZSetIncrementBy',
|
||||
'zrem' => 'Predis\Commands\ZSetRemove',
|
||||
'zrange' => 'Predis\Commands\ZSetRange',
|
||||
'zrevrange' => 'Predis\Commands\ZSetReverseRange',
|
||||
'zrangebyscore' => 'Predis\Commands\ZSetRangeByScore',
|
||||
'zcard' => 'Predis\Commands\ZSetCardinality',
|
||||
'zscore' => 'Predis\Commands\ZSetScore',
|
||||
'zremrangebyscore' => 'Predis\Commands\ZSetRemoveRangeByScore',
|
||||
|
||||
/* connection related commands */
|
||||
'ping' => '\Predis\Commands\ConnectionPing',
|
||||
'auth' => '\Predis\Commands\ConnectionAuth',
|
||||
'select' => '\Predis\Commands\ConnectionSelect',
|
||||
'echo' => '\Predis\Commands\ConnectionEcho',
|
||||
'quit' => '\Predis\Commands\ConnectionQuit',
|
||||
'ping' => 'Predis\Commands\ConnectionPing',
|
||||
'auth' => 'Predis\Commands\ConnectionAuth',
|
||||
'select' => 'Predis\Commands\ConnectionSelect',
|
||||
'echo' => 'Predis\Commands\ConnectionEcho',
|
||||
'quit' => 'Predis\Commands\ConnectionQuit',
|
||||
|
||||
/* remote server control commands */
|
||||
'info' => '\Predis\Commands\ServerInfo',
|
||||
'slaveof' => '\Predis\Commands\ServerSlaveOf',
|
||||
'monitor' => '\Predis\Commands\ServerMonitor',
|
||||
'dbsize' => '\Predis\Commands\ServerDatabaseSize',
|
||||
'flushdb' => '\Predis\Commands\ServerFlushDatabase',
|
||||
'flushall' => '\Predis\Commands\ServerFlushAll',
|
||||
'save' => '\Predis\Commands\ServerSave',
|
||||
'bgsave' => '\Predis\Commands\ServerBackgroundSave',
|
||||
'lastsave' => '\Predis\Commands\ServerLastSave',
|
||||
'shutdown' => '\Predis\Commands\ServerShutdown',
|
||||
'bgrewriteaof' => '\Predis\Commands\ServerBackgroundRewriteAOF',
|
||||
'info' => 'Predis\Commands\ServerInfo',
|
||||
'slaveof' => 'Predis\Commands\ServerSlaveOf',
|
||||
'monitor' => 'Predis\Commands\ServerMonitor',
|
||||
'dbsize' => 'Predis\Commands\ServerDatabaseSize',
|
||||
'flushdb' => 'Predis\Commands\ServerFlushDatabase',
|
||||
'flushall' => 'Predis\Commands\ServerFlushAll',
|
||||
'save' => 'Predis\Commands\ServerSave',
|
||||
'bgsave' => 'Predis\Commands\ServerBackgroundSave',
|
||||
'lastsave' => 'Predis\Commands\ServerLastSave',
|
||||
'shutdown' => 'Predis\Commands\ServerShutdown',
|
||||
'bgrewriteaof' => 'Predis\Commands\ServerBackgroundRewriteAOF',
|
||||
|
||||
|
||||
/* ---------------- Redis 2.0 ---------------- */
|
||||
|
||||
/* commands operating on string values */
|
||||
'setex' => '\Predis\Commands\StringSetExpire',
|
||||
'append' => '\Predis\Commands\StringAppend',
|
||||
'substr' => '\Predis\Commands\StringSubstr',
|
||||
'setex' => 'Predis\Commands\StringSetExpire',
|
||||
'append' => 'Predis\Commands\StringAppend',
|
||||
'substr' => 'Predis\Commands\StringSubstr',
|
||||
|
||||
/* commands operating on lists */
|
||||
'blpop' => '\Predis\Commands\ListPopFirstBlocking',
|
||||
'brpop' => '\Predis\Commands\ListPopLastBlocking',
|
||||
'blpop' => 'Predis\Commands\ListPopFirstBlocking',
|
||||
'brpop' => 'Predis\Commands\ListPopLastBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'zunionstore' => '\Predis\Commands\ZSetUnionStore',
|
||||
'zinterstore' => '\Predis\Commands\ZSetIntersectionStore',
|
||||
'zcount' => '\Predis\Commands\ZSetCount',
|
||||
'zrank' => '\Predis\Commands\ZSetRank',
|
||||
'zrevrank' => '\Predis\Commands\ZSetReverseRank',
|
||||
'zremrangebyrank' => '\Predis\Commands\ZSetRemoveRangeByRank',
|
||||
'zunionstore' => 'Predis\Commands\ZSetUnionStore',
|
||||
'zinterstore' => 'Predis\Commands\ZSetIntersectionStore',
|
||||
'zcount' => 'Predis\Commands\ZSetCount',
|
||||
'zrank' => 'Predis\Commands\ZSetRank',
|
||||
'zrevrank' => 'Predis\Commands\ZSetReverseRank',
|
||||
'zremrangebyrank' => 'Predis\Commands\ZSetRemoveRangeByRank',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'hset' => '\Predis\Commands\HashSet',
|
||||
'hsetnx' => '\Predis\Commands\HashSetPreserve',
|
||||
'hmset' => '\Predis\Commands\HashSetMultiple',
|
||||
'hincrby' => '\Predis\Commands\HashIncrementBy',
|
||||
'hget' => '\Predis\Commands\HashGet',
|
||||
'hmget' => '\Predis\Commands\HashGetMultiple',
|
||||
'hdel' => '\Predis\Commands\HashDelete',
|
||||
'hexists' => '\Predis\Commands\HashExists',
|
||||
'hlen' => '\Predis\Commands\HashLength',
|
||||
'hkeys' => '\Predis\Commands\HashKeys',
|
||||
'hvals' => '\Predis\Commands\HashValues',
|
||||
'hgetall' => '\Predis\Commands\HashGetAll',
|
||||
'hset' => 'Predis\Commands\HashSet',
|
||||
'hsetnx' => 'Predis\Commands\HashSetPreserve',
|
||||
'hmset' => 'Predis\Commands\HashSetMultiple',
|
||||
'hincrby' => 'Predis\Commands\HashIncrementBy',
|
||||
'hget' => 'Predis\Commands\HashGet',
|
||||
'hmget' => 'Predis\Commands\HashGetMultiple',
|
||||
'hdel' => 'Predis\Commands\HashDelete',
|
||||
'hexists' => 'Predis\Commands\HashExists',
|
||||
'hlen' => 'Predis\Commands\HashLength',
|
||||
'hkeys' => 'Predis\Commands\HashKeys',
|
||||
'hvals' => 'Predis\Commands\HashValues',
|
||||
'hgetall' => 'Predis\Commands\HashGetAll',
|
||||
|
||||
/* transactions */
|
||||
'multi' => '\Predis\Commands\TransactionMulti',
|
||||
'exec' => '\Predis\Commands\TransactionExec',
|
||||
'discard' => '\Predis\Commands\TransactionDiscard',
|
||||
'multi' => 'Predis\Commands\TransactionMulti',
|
||||
'exec' => 'Predis\Commands\TransactionExec',
|
||||
'discard' => 'Predis\Commands\TransactionDiscard',
|
||||
|
||||
/* publish - subscribe */
|
||||
'subscribe' => '\Predis\Commands\PubSubSubscribe',
|
||||
'unsubscribe' => '\Predis\Commands\PubSubUnsubscribe',
|
||||
'psubscribe' => '\Predis\Commands\PubSubSubscribeByPattern',
|
||||
'punsubscribe' => '\Predis\Commands\PubSubUnsubscribeByPattern',
|
||||
'publish' => '\Predis\Commands\PubSubPublish',
|
||||
'subscribe' => 'Predis\Commands\PubSubSubscribe',
|
||||
'unsubscribe' => 'Predis\Commands\PubSubUnsubscribe',
|
||||
'psubscribe' => 'Predis\Commands\PubSubSubscribeByPattern',
|
||||
'punsubscribe' => 'Predis\Commands\PubSubUnsubscribeByPattern',
|
||||
'publish' => 'Predis\Commands\PubSubPublish',
|
||||
|
||||
/* remote server control commands */
|
||||
'config' => '\Predis\Commands\ServerConfig',
|
||||
'config' => 'Predis\Commands\ServerConfig',
|
||||
|
||||
|
||||
/* ---------------- Redis 2.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'persist' => '\Predis\Commands\KeyPersist',
|
||||
'persist' => 'Predis\Commands\KeyPersist',
|
||||
|
||||
/* commands operating on string values */
|
||||
'strlen' => '\Predis\Commands\StringStrlen',
|
||||
'setrange' => '\Predis\Commands\StringSetRange',
|
||||
'getrange' => '\Predis\Commands\StringGetRange',
|
||||
'setbit' => '\Predis\Commands\StringSetBit',
|
||||
'getbit' => '\Predis\Commands\StringGetBit',
|
||||
'strlen' => 'Predis\Commands\StringStrlen',
|
||||
'setrange' => 'Predis\Commands\StringSetRange',
|
||||
'getrange' => 'Predis\Commands\StringGetRange',
|
||||
'setbit' => 'Predis\Commands\StringSetBit',
|
||||
'getbit' => 'Predis\Commands\StringGetBit',
|
||||
|
||||
/* commands operating on lists */
|
||||
'rpushx' => '\Predis\Commands\ListPushTailX',
|
||||
'lpushx' => '\Predis\Commands\ListPushHeadX',
|
||||
'linsert' => '\Predis\Commands\ListInsert',
|
||||
'brpoplpush' => '\Predis\Commands\ListPopLastPushHeadBlocking',
|
||||
'rpushx' => 'Predis\Commands\ListPushTailX',
|
||||
'lpushx' => 'Predis\Commands\ListPushHeadX',
|
||||
'linsert' => 'Predis\Commands\ListInsert',
|
||||
'brpoplpush' => 'Predis\Commands\ListPopLastPushHeadBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'zrevrangebyscore' => '\Predis\Commands\ZSetReverseRangeByScore',
|
||||
'zrevrangebyscore' => 'Predis\Commands\ZSetReverseRangeByScore',
|
||||
|
||||
/* transactions */
|
||||
'watch' => '\Predis\Commands\TransactionWatch',
|
||||
'unwatch' => '\Predis\Commands\TransactionUnwatch',
|
||||
'watch' => 'Predis\Commands\TransactionWatch',
|
||||
'unwatch' => 'Predis\Commands\TransactionUnwatch',
|
||||
|
||||
/* remote server control commands */
|
||||
'object' => '\Predis\Commands\ServerObject',
|
||||
'slowlog' => '\Predis\Commands\ServerSlowlog',
|
||||
'object' => 'Predis\Commands\ServerObject',
|
||||
'slowlog' => 'Predis\Commands\ServerSlowlog',
|
||||
|
||||
|
||||
/* ---------------- Redis 2.4 ---------------- */
|
||||
|
||||
/* remote server control commands */
|
||||
'client' => '\Predis\Commands\ServerClient',
|
||||
'client' => 'Predis\Commands\ServerClient',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,24 +33,24 @@ class ServerVersionNext extends ServerVersion24
|
||||
{
|
||||
return array_merge(parent::getSupportedCommands(), array(
|
||||
/* commands operating on the key space */
|
||||
'pttl' => '\Predis\Commands\KeyPreciseTimeToLive',
|
||||
'pexpire' => '\Predis\Commands\KeyPreciseExpire',
|
||||
'pexpireat' => '\Predis\Commands\KeyPreciseExpireAt',
|
||||
'pttl' => 'Predis\Commands\KeyPreciseTimeToLive',
|
||||
'pexpire' => 'Predis\Commands\KeyPreciseExpire',
|
||||
'pexpireat' => 'Predis\Commands\KeyPreciseExpireAt',
|
||||
|
||||
/* commands operating on string values */
|
||||
'psetex' => '\Predis\Commands\StringPreciseSetExpire',
|
||||
'incrbyfloat' => '\Predis\Commands\StringIncrementByFloat',
|
||||
'psetex' => 'Predis\Commands\StringPreciseSetExpire',
|
||||
'incrbyfloat' => 'Predis\Commands\StringIncrementByFloat',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'hincrbyfloat' => '\Predis\Commands\HashIncrementByFloat',
|
||||
'hincrbyfloat' => 'Predis\Commands\HashIncrementByFloat',
|
||||
|
||||
/* scripting */
|
||||
'eval' => '\Predis\Commands\ServerEval',
|
||||
'evalsha' => '\Predis\Commands\ServerEvalSHA',
|
||||
'script' => '\Predis\Commands\ServerScript',
|
||||
'eval' => 'Predis\Commands\ServerEval',
|
||||
'evalsha' => 'Predis\Commands\ServerEvalSHA',
|
||||
'script' => 'Predis\Commands\ServerScript',
|
||||
|
||||
/* remote server control commands */
|
||||
'info' => '\Predis\Commands\ServerInfoV26x',
|
||||
'info' => 'Predis\Commands\ServerInfoV26x',
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user