diff --git a/lib/Predis.php b/lib/Predis.php index abc95b63..c93d761d 100644 --- a/lib/Predis.php +++ b/lib/Predis.php @@ -1637,127 +1637,74 @@ class RedisServer_v1_2 extends RedisServerProfile { /* commands operating on string values */ 'set' => '\Predis\Commands\Set', 'setnx' => '\Predis\Commands\SetPreserve', - 'setPreserve' => '\Predis\Commands\SetPreserve', 'mset' => '\Predis\Commands\SetMultiple', - 'setMultiple' => '\Predis\Commands\SetMultiple', 'msetnx' => '\Predis\Commands\SetMultiplePreserve', - 'setMultiplePreserve' => '\Predis\Commands\SetMultiplePreserve', 'get' => '\Predis\Commands\Get', 'mget' => '\Predis\Commands\GetMultiple', - 'getMultiple' => '\Predis\Commands\GetMultiple', 'getset' => '\Predis\Commands\GetSet', - 'getSet' => '\Predis\Commands\GetSet', 'incr' => '\Predis\Commands\Increment', - 'increment' => '\Predis\Commands\Increment', 'incrby' => '\Predis\Commands\IncrementBy', - 'incrementBy' => '\Predis\Commands\IncrementBy', 'decr' => '\Predis\Commands\Decrement', - 'decrement' => '\Predis\Commands\Decrement', 'decrby' => '\Predis\Commands\DecrementBy', - 'decrementBy' => '\Predis\Commands\DecrementBy', 'exists' => '\Predis\Commands\Exists', 'del' => '\Predis\Commands\Delete', - 'delete' => '\Predis\Commands\Delete', 'type' => '\Predis\Commands\Type', /* commands operating on the key space */ 'keys' => '\Predis\Commands\Keys', 'randomkey' => '\Predis\Commands\RandomKey', - 'randomKey' => '\Predis\Commands\RandomKey', 'rename' => '\Predis\Commands\Rename', 'renamenx' => '\Predis\Commands\RenamePreserve', - 'renamePreserve' => '\Predis\Commands\RenamePreserve', 'expire' => '\Predis\Commands\Expire', 'expireat' => '\Predis\Commands\ExpireAt', - 'expireAt' => '\Predis\Commands\ExpireAt', 'dbsize' => '\Predis\Commands\DatabaseSize', - 'databaseSize' => '\Predis\Commands\DatabaseSize', 'ttl' => '\Predis\Commands\TimeToLive', - 'timeToLive' => '\Predis\Commands\TimeToLive', /* commands operating on lists */ 'rpush' => '\Predis\Commands\ListPushTail', - 'pushTail' => '\Predis\Commands\ListPushTail', 'lpush' => '\Predis\Commands\ListPushHead', - 'pushHead' => '\Predis\Commands\ListPushHead', 'llen' => '\Predis\Commands\ListLength', - 'listLength' => '\Predis\Commands\ListLength', 'lrange' => '\Predis\Commands\ListRange', - 'listRange' => '\Predis\Commands\ListRange', 'ltrim' => '\Predis\Commands\ListTrim', - 'listTrim' => '\Predis\Commands\ListTrim', 'lindex' => '\Predis\Commands\ListIndex', - 'listIndex' => '\Predis\Commands\ListIndex', 'lset' => '\Predis\Commands\ListSet', - 'listSet' => '\Predis\Commands\ListSet', 'lrem' => '\Predis\Commands\ListRemove', - 'listRemove' => '\Predis\Commands\ListRemove', 'lpop' => '\Predis\Commands\ListPopFirst', - 'popFirst' => '\Predis\Commands\ListPopFirst', 'rpop' => '\Predis\Commands\ListPopLast', - 'popLast' => '\Predis\Commands\ListPopLast', 'rpoplpush' => '\Predis\Commands\ListPopLastPushHead', - 'listPopLastPushHead' => '\Predis\Commands\ListPopLastPushHead', /* commands operating on sets */ 'sadd' => '\Predis\Commands\SetAdd', - 'setAdd' => '\Predis\Commands\SetAdd', 'srem' => '\Predis\Commands\SetRemove', - 'setRemove' => '\Predis\Commands\SetRemove', 'spop' => '\Predis\Commands\SetPop', - 'setPop' => '\Predis\Commands\SetPop', 'smove' => '\Predis\Commands\SetMove', - 'setMove' => '\Predis\Commands\SetMove', 'scard' => '\Predis\Commands\SetCardinality', - 'setCardinality' => '\Predis\Commands\SetCardinality', 'sismember' => '\Predis\Commands\SetIsMember', - 'setIsMember' => '\Predis\Commands\SetIsMember', 'sinter' => '\Predis\Commands\SetIntersection', - 'setIntersection' => '\Predis\Commands\SetIntersection', 'sinterstore' => '\Predis\Commands\SetIntersectionStore', - 'setIntersectionStore' => '\Predis\Commands\SetIntersectionStore', 'sunion' => '\Predis\Commands\SetUnion', - 'setUnion' => '\Predis\Commands\SetUnion', 'sunionstore' => '\Predis\Commands\SetUnionStore', - 'setUnionStore' => '\Predis\Commands\SetUnionStore', 'sdiff' => '\Predis\Commands\SetDifference', - 'setDifference' => '\Predis\Commands\SetDifference', 'sdiffstore' => '\Predis\Commands\SetDifferenceStore', - 'setDifferenceStore' => '\Predis\Commands\SetDifferenceStore', 'smembers' => '\Predis\Commands\SetMembers', - 'setMembers' => '\Predis\Commands\SetMembers', 'srandmember' => '\Predis\Commands\SetRandomMember', - 'setRandomMember' => '\Predis\Commands\SetRandomMember', /* commands operating on sorted sets */ 'zadd' => '\Predis\Commands\ZSetAdd', - 'zsetAdd' => '\Predis\Commands\ZSetAdd', 'zincrby' => '\Predis\Commands\ZSetIncrementBy', - 'zsetIncrementBy' => '\Predis\Commands\ZSetIncrementBy', 'zrem' => '\Predis\Commands\ZSetRemove', - 'zsetRemove' => '\Predis\Commands\ZSetRemove', 'zrange' => '\Predis\Commands\ZSetRange', - 'zsetRange' => '\Predis\Commands\ZSetRange', 'zrevrange' => '\Predis\Commands\ZSetReverseRange', - 'zsetReverseRange' => '\Predis\Commands\ZSetReverseRange', 'zrangebyscore' => '\Predis\Commands\ZSetRangeByScore', - 'zsetRangeByScore' => '\Predis\Commands\ZSetRangeByScore', 'zcard' => '\Predis\Commands\ZSetCardinality', - 'zsetCardinality' => '\Predis\Commands\ZSetCardinality', 'zscore' => '\Predis\Commands\ZSetScore', - 'zsetScore' => '\Predis\Commands\ZSetScore', 'zremrangebyscore' => '\Predis\Commands\ZSetRemoveRangeByScore', - 'zsetRemoveRangeByScore' => '\Predis\Commands\ZSetRemoveRangeByScore', /* multiple databases handling commands */ 'select' => '\Predis\Commands\SelectDatabase', - 'selectDatabase' => '\Predis\Commands\SelectDatabase', 'move' => '\Predis\Commands\MoveKey', - 'moveKey' => '\Predis\Commands\MoveKey', 'flushdb' => '\Predis\Commands\FlushDatabase', - 'flushDatabase' => '\Predis\Commands\FlushDatabase', 'flushall' => '\Predis\Commands\FlushAll', - 'flushDatabases' => '\Predis\Commands\FlushAll', /* sorting */ 'sort' => '\Predis\Commands\Sort', @@ -1765,17 +1712,13 @@ class RedisServer_v1_2 extends RedisServerProfile { /* remote server control commands */ 'info' => '\Predis\Commands\Info', 'slaveof' => '\Predis\Commands\SlaveOf', - 'slaveOf' => '\Predis\Commands\SlaveOf', /* persistence control commands */ 'save' => '\Predis\Commands\Save', 'bgsave' => '\Predis\Commands\BackgroundSave', - 'backgroundSave' => '\Predis\Commands\BackgroundSave', 'lastsave' => '\Predis\Commands\LastSave', - 'lastSave' => '\Predis\Commands\LastSave', 'shutdown' => '\Predis\Commands\Shutdown', - 'bgrewriteaof' => '\Predis\Commands\BackgroundRewriteAppendOnlyFile', - 'backgroundRewriteAppendOnlyFile' => '\Predis\Commands\BackgroundRewriteAppendOnlyFile', + 'bgrewriteaof' => '\Predis\Commands\BackgroundRewriteAppendOnlyFile', ); } } @@ -1791,55 +1734,34 @@ class RedisServer_v2_0 extends RedisServer_v1_2 { /* commands operating on string values */ 'setex' => '\Predis\Commands\SetExpire', - 'setExpire' => '\Predis\Commands\SetExpire', 'append' => '\Predis\Commands\Append', 'substr' => '\Predis\Commands\Substr', /* commands operating on lists */ 'blpop' => '\Predis\Commands\ListPopFirstBlocking', - 'popFirstBlocking' => '\Predis\Commands\ListPopFirstBlocking', 'brpop' => '\Predis\Commands\ListPopLastBlocking', - 'popLastBlocking' => '\Predis\Commands\ListPopLastBlocking', /* commands operating on sorted sets */ 'zunionstore' => '\Predis\Commands\ZSetUnionStore', - 'zsetUnionStore' => '\Predis\Commands\ZSetUnionStore', 'zinterstore' => '\Predis\Commands\ZSetIntersectionStore', - 'zsetIntersectionStore' => '\Predis\Commands\ZSetIntersectionStore', 'zcount' => '\Predis\Commands\ZSetCount', - 'zsetCount' => '\Predis\Commands\ZSetCount', 'zrank' => '\Predis\Commands\ZSetRank', - 'zsetRank' => '\Predis\Commands\ZSetRank', 'zrevrank' => '\Predis\Commands\ZSetReverseRank', - 'zsetReverseRank' => '\Predis\Commands\ZSetReverseRank', 'zremrangebyrank' => '\Predis\Commands\ZSetRemoveRangeByRank', - 'zsetRemoveRangeByRank' => '\Predis\Commands\ZSetRemoveRangeByRank', /* commands operating on hashes */ 'hset' => '\Predis\Commands\HashSet', - 'hashSet' => '\Predis\Commands\HashSet', 'hsetnx' => '\Predis\Commands\HashSetPreserve', - 'hashSetPreserve' => '\Predis\Commands\HashSetPreserve', 'hmset' => '\Predis\Commands\HashSetMultiple', - 'hashSetMultiple' => '\Predis\Commands\HashSetMultiple', 'hincrby' => '\Predis\Commands\HashIncrementBy', - 'hashIncrementBy' => '\Predis\Commands\HashIncrementBy', 'hget' => '\Predis\Commands\HashGet', - 'hashGet' => '\Predis\Commands\HashGet', 'hmget' => '\Predis\Commands\HashGetMultiple', - 'hashGetMultiple' => '\Predis\Commands\HashGetMultiple', 'hdel' => '\Predis\Commands\HashDelete', - 'hashDelete' => '\Predis\Commands\HashDelete', 'hexists' => '\Predis\Commands\HashExists', - 'hashExists' => '\Predis\Commands\HashExists', 'hlen' => '\Predis\Commands\HashLength', - 'hashLength' => '\Predis\Commands\HashLength', 'hkeys' => '\Predis\Commands\HashKeys', - 'hashKeys' => '\Predis\Commands\HashKeys', 'hvals' => '\Predis\Commands\HashValues', - 'hashValues' => '\Predis\Commands\HashValues', 'hgetall' => '\Predis\Commands\HashGetAll', - 'hashGetAll' => '\Predis\Commands\HashGetAll', /* publish - subscribe */ 'subscribe' => '\Predis\Commands\Subscribe', @@ -1850,7 +1772,6 @@ class RedisServer_v2_0 extends RedisServer_v1_2 { /* remote server control commands */ 'config' => '\Predis\Commands\Config', - 'configuration' => '\Predis\Commands\Config', )); } } diff --git a/lib/Predis_Compatibility.php b/lib/Predis_Compatibility.php index 5033aeca..4ae18e6c 100644 --- a/lib/Predis_Compatibility.php +++ b/lib/Predis_Compatibility.php @@ -24,7 +24,7 @@ abstract class BulkCommand extends Command { } } -RedisServerProfile::registerProfile('\Predis\RedisServer_v1_0', '1.0'); +/* ------------------------------------------------------------------------- */ class RedisServer_v1_0 extends \Predis\RedisServerProfile { public function getVersion() { return '1.0'; } @@ -126,7 +126,7 @@ class RedisServer_v1_0 extends \Predis\RedisServerProfile { 'setMembers' => '\Predis\Compatibility\v1_0\Commands\SetMembers', 'srandmember' => '\Predis\Compatibility\v1_0\Commands\SetRandomMember', 'setRandomMember' => '\Predis\Compatibility\v1_0\Commands\SetRandomMember', - + /* multiple databases handling commands */ 'select' => '\Predis\Compatibility\v1_0\Commands\SelectDatabase', 'selectDatabase' => '\Predis\Compatibility\v1_0\Commands\SelectDatabase', @@ -156,6 +156,243 @@ class RedisServer_v1_0 extends \Predis\RedisServerProfile { } } +class RedisServer_LongNames_v1_2 extends RedisServerProfile { + public function getVersion() { return '1.2'; } + public function getSupportedCommands() { + return array( + /* miscellaneous commands */ + 'ping' => '\Predis\Commands\Ping', + 'echo' => '\Predis\Commands\DoEcho', + 'auth' => '\Predis\Commands\Auth', + + /* connection handling */ + 'quit' => '\Predis\Commands\Quit', + + /* commands operating on string values */ + 'set' => '\Predis\Commands\Set', + 'setnx' => '\Predis\Commands\SetPreserve', + 'setPreserve' => '\Predis\Commands\SetPreserve', + 'mset' => '\Predis\Commands\SetMultiple', + 'setMultiple' => '\Predis\Commands\SetMultiple', + 'msetnx' => '\Predis\Commands\SetMultiplePreserve', + 'setMultiplePreserve' => '\Predis\Commands\SetMultiplePreserve', + 'get' => '\Predis\Commands\Get', + 'mget' => '\Predis\Commands\GetMultiple', + 'getMultiple' => '\Predis\Commands\GetMultiple', + 'getset' => '\Predis\Commands\GetSet', + 'getSet' => '\Predis\Commands\GetSet', + 'incr' => '\Predis\Commands\Increment', + 'increment' => '\Predis\Commands\Increment', + 'incrby' => '\Predis\Commands\IncrementBy', + 'incrementBy' => '\Predis\Commands\IncrementBy', + 'decr' => '\Predis\Commands\Decrement', + 'decrement' => '\Predis\Commands\Decrement', + 'decrby' => '\Predis\Commands\DecrementBy', + 'decrementBy' => '\Predis\Commands\DecrementBy', + 'exists' => '\Predis\Commands\Exists', + 'del' => '\Predis\Commands\Delete', + 'delete' => '\Predis\Commands\Delete', + 'type' => '\Predis\Commands\Type', + + /* commands operating on the key space */ + 'keys' => '\Predis\Commands\Keys', + 'randomkey' => '\Predis\Commands\RandomKey', + 'randomKey' => '\Predis\Commands\RandomKey', + 'rename' => '\Predis\Commands\Rename', + 'renamenx' => '\Predis\Commands\RenamePreserve', + 'renamePreserve' => '\Predis\Commands\RenamePreserve', + 'expire' => '\Predis\Commands\Expire', + 'expireat' => '\Predis\Commands\ExpireAt', + 'expireAt' => '\Predis\Commands\ExpireAt', + 'dbsize' => '\Predis\Commands\DatabaseSize', + 'databaseSize' => '\Predis\Commands\DatabaseSize', + 'ttl' => '\Predis\Commands\TimeToLive', + 'timeToLive' => '\Predis\Commands\TimeToLive', + + /* commands operating on lists */ + 'rpush' => '\Predis\Commands\ListPushTail', + 'pushTail' => '\Predis\Commands\ListPushTail', + 'lpush' => '\Predis\Commands\ListPushHead', + 'pushHead' => '\Predis\Commands\ListPushHead', + 'llen' => '\Predis\Commands\ListLength', + 'listLength' => '\Predis\Commands\ListLength', + 'lrange' => '\Predis\Commands\ListRange', + 'listRange' => '\Predis\Commands\ListRange', + 'ltrim' => '\Predis\Commands\ListTrim', + 'listTrim' => '\Predis\Commands\ListTrim', + 'lindex' => '\Predis\Commands\ListIndex', + 'listIndex' => '\Predis\Commands\ListIndex', + 'lset' => '\Predis\Commands\ListSet', + 'listSet' => '\Predis\Commands\ListSet', + 'lrem' => '\Predis\Commands\ListRemove', + 'listRemove' => '\Predis\Commands\ListRemove', + 'lpop' => '\Predis\Commands\ListPopFirst', + 'popFirst' => '\Predis\Commands\ListPopFirst', + 'rpop' => '\Predis\Commands\ListPopLast', + 'popLast' => '\Predis\Commands\ListPopLast', + 'rpoplpush' => '\Predis\Commands\ListPopLastPushHead', + 'listPopLastPushHead' => '\Predis\Commands\ListPopLastPushHead', + + /* commands operating on sets */ + 'sadd' => '\Predis\Commands\SetAdd', + 'setAdd' => '\Predis\Commands\SetAdd', + 'srem' => '\Predis\Commands\SetRemove', + 'setRemove' => '\Predis\Commands\SetRemove', + 'spop' => '\Predis\Commands\SetPop', + 'setPop' => '\Predis\Commands\SetPop', + 'smove' => '\Predis\Commands\SetMove', + 'setMove' => '\Predis\Commands\SetMove', + 'scard' => '\Predis\Commands\SetCardinality', + 'setCardinality' => '\Predis\Commands\SetCardinality', + 'sismember' => '\Predis\Commands\SetIsMember', + 'setIsMember' => '\Predis\Commands\SetIsMember', + 'sinter' => '\Predis\Commands\SetIntersection', + 'setIntersection' => '\Predis\Commands\SetIntersection', + 'sinterstore' => '\Predis\Commands\SetIntersectionStore', + 'setIntersectionStore' => '\Predis\Commands\SetIntersectionStore', + 'sunion' => '\Predis\Commands\SetUnion', + 'setUnion' => '\Predis\Commands\SetUnion', + 'sunionstore' => '\Predis\Commands\SetUnionStore', + 'setUnionStore' => '\Predis\Commands\SetUnionStore', + 'sdiff' => '\Predis\Commands\SetDifference', + 'setDifference' => '\Predis\Commands\SetDifference', + 'sdiffstore' => '\Predis\Commands\SetDifferenceStore', + 'setDifferenceStore' => '\Predis\Commands\SetDifferenceStore', + 'smembers' => '\Predis\Commands\SetMembers', + 'setMembers' => '\Predis\Commands\SetMembers', + 'srandmember' => '\Predis\Commands\SetRandomMember', + 'setRandomMember' => '\Predis\Commands\SetRandomMember', + + /* commands operating on sorted sets */ + 'zadd' => '\Predis\Commands\ZSetAdd', + 'zsetAdd' => '\Predis\Commands\ZSetAdd', + 'zincrby' => '\Predis\Commands\ZSetIncrementBy', + 'zsetIncrementBy' => '\Predis\Commands\ZSetIncrementBy', + 'zrem' => '\Predis\Commands\ZSetRemove', + 'zsetRemove' => '\Predis\Commands\ZSetRemove', + 'zrange' => '\Predis\Commands\ZSetRange', + 'zsetRange' => '\Predis\Commands\ZSetRange', + 'zrevrange' => '\Predis\Commands\ZSetReverseRange', + 'zsetReverseRange' => '\Predis\Commands\ZSetReverseRange', + 'zrangebyscore' => '\Predis\Commands\ZSetRangeByScore', + 'zsetRangeByScore' => '\Predis\Commands\ZSetRangeByScore', + 'zcard' => '\Predis\Commands\ZSetCardinality', + 'zsetCardinality' => '\Predis\Commands\ZSetCardinality', + 'zscore' => '\Predis\Commands\ZSetScore', + 'zsetScore' => '\Predis\Commands\ZSetScore', + 'zremrangebyscore' => '\Predis\Commands\ZSetRemoveRangeByScore', + 'zsetRemoveRangeByScore' => '\Predis\Commands\ZSetRemoveRangeByScore', + + /* multiple databases handling commands */ + 'select' => '\Predis\Commands\SelectDatabase', + 'selectDatabase' => '\Predis\Commands\SelectDatabase', + 'move' => '\Predis\Commands\MoveKey', + 'moveKey' => '\Predis\Commands\MoveKey', + 'flushdb' => '\Predis\Commands\FlushDatabase', + 'flushDatabase' => '\Predis\Commands\FlushDatabase', + 'flushall' => '\Predis\Commands\FlushAll', + 'flushDatabases' => '\Predis\Commands\FlushAll', + + /* sorting */ + 'sort' => '\Predis\Commands\Sort', + + /* remote server control commands */ + 'info' => '\Predis\Commands\Info', + 'slaveof' => '\Predis\Commands\SlaveOf', + 'slaveOf' => '\Predis\Commands\SlaveOf', + + /* persistence control commands */ + 'save' => '\Predis\Commands\Save', + 'bgsave' => '\Predis\Commands\BackgroundSave', + 'backgroundSave' => '\Predis\Commands\BackgroundSave', + 'lastsave' => '\Predis\Commands\LastSave', + 'lastSave' => '\Predis\Commands\LastSave', + 'shutdown' => '\Predis\Commands\Shutdown', + 'bgrewriteaof' => '\Predis\Commands\BackgroundRewriteAppendOnlyFile', + 'backgroundRewriteAppendOnlyFile' => '\Predis\Commands\BackgroundRewriteAppendOnlyFile', + ); + } +} + +class RedisServer_LongNames_v2_0 extends RedisServer_LongNames_v1_2 { + public function getVersion() { return '2.0'; } + public function getSupportedCommands() { + return array_merge(parent::getSupportedCommands(), array( + /* transactions */ + 'multi' => '\Predis\Commands\Multi', + 'exec' => '\Predis\Commands\Exec', + 'discard' => '\Predis\Commands\Discard', + + /* commands operating on string values */ + 'setex' => '\Predis\Commands\SetExpire', + 'setExpire' => '\Predis\Commands\SetExpire', + 'append' => '\Predis\Commands\Append', + 'substr' => '\Predis\Commands\Substr', + + /* commands operating on lists */ + 'blpop' => '\Predis\Commands\ListPopFirstBlocking', + 'popFirstBlocking' => '\Predis\Commands\ListPopFirstBlocking', + 'brpop' => '\Predis\Commands\ListPopLastBlocking', + 'popLastBlocking' => '\Predis\Commands\ListPopLastBlocking', + + /* commands operating on sorted sets */ + 'zunionstore' => '\Predis\Commands\ZSetUnionStore', + 'zsetUnionStore' => '\Predis\Commands\ZSetUnionStore', + 'zinterstore' => '\Predis\Commands\ZSetIntersectionStore', + 'zsetIntersectionStore' => '\Predis\Commands\ZSetIntersectionStore', + 'zcount' => '\Predis\Commands\ZSetCount', + 'zsetCount' => '\Predis\Commands\ZSetCount', + 'zrank' => '\Predis\Commands\ZSetRank', + 'zsetRank' => '\Predis\Commands\ZSetRank', + 'zrevrank' => '\Predis\Commands\ZSetReverseRank', + 'zsetReverseRank' => '\Predis\Commands\ZSetReverseRank', + 'zremrangebyrank' => '\Predis\Commands\ZSetRemoveRangeByRank', + 'zsetRemoveRangeByRank' => '\Predis\Commands\ZSetRemoveRangeByRank', + + /* commands operating on hashes */ + 'hset' => '\Predis\Commands\HashSet', + 'hashSet' => '\Predis\Commands\HashSet', + 'hsetnx' => '\Predis\Commands\HashSetPreserve', + 'hashSetPreserve' => '\Predis\Commands\HashSetPreserve', + 'hmset' => '\Predis\Commands\HashSetMultiple', + 'hashSetMultiple' => '\Predis\Commands\HashSetMultiple', + 'hincrby' => '\Predis\Commands\HashIncrementBy', + 'hashIncrementBy' => '\Predis\Commands\HashIncrementBy', + 'hget' => '\Predis\Commands\HashGet', + 'hashGet' => '\Predis\Commands\HashGet', + 'hmget' => '\Predis\Commands\HashGetMultiple', + 'hashGetMultiple' => '\Predis\Commands\HashGetMultiple', + 'hdel' => '\Predis\Commands\HashDelete', + 'hashDelete' => '\Predis\Commands\HashDelete', + 'hexists' => '\Predis\Commands\HashExists', + 'hashExists' => '\Predis\Commands\HashExists', + 'hlen' => '\Predis\Commands\HashLength', + 'hashLength' => '\Predis\Commands\HashLength', + 'hkeys' => '\Predis\Commands\HashKeys', + 'hashKeys' => '\Predis\Commands\HashKeys', + 'hvals' => '\Predis\Commands\HashValues', + 'hashValues' => '\Predis\Commands\HashValues', + 'hgetall' => '\Predis\Commands\HashGetAll', + 'hashGetAll' => '\Predis\Commands\HashGetAll', + + /* publish - subscribe */ + 'subscribe' => '\Predis\Commands\Subscribe', + 'unsubscribe' => '\Predis\Commands\Unsubscribe', + 'psubscribe' => '\Predis\Commands\SubscribeByPattern', + 'punsubscribe' => '\Predis\Commands\UnsubscribeByPattern', + 'publish' => '\Predis\Commands\Publish', + + /* remote server control commands */ + 'config' => '\Predis\Commands\Config', + 'configuration' => '\Predis\Commands\Config', + )); + } +} + +RedisServerProfile::registerProfile('\Predis\RedisServer_v1_0', '1.0'); +RedisServerProfile::registerProfile('\Predis\RedisServer_LongNames_v1_2', '1.2'); +RedisServerProfile::registerProfile('\Predis\RedisServer_LongNames_v2_0', '2.0'); + /* ------------------------------------------------------------------------- */ namespace Predis\Compatibility\v1_0\Commands; diff --git a/test/PredisClientFeatures.php b/test/PredisClientFeatures.php index 4a2b8429..abf6e7cd 100644 --- a/test/PredisClientFeatures.php +++ b/test/PredisClientFeatures.php @@ -10,7 +10,7 @@ class PredisClientFeaturesTestSuite extends PHPUnit_Framework_TestCase { protected function setUp() { $this->redis = RC::getConnection(); - $this->redis->flushDatabase(); + $this->redis->flushdb(); } protected function tearDown() {