mirror of
https://github.com/newnius/YAO-portal.git
synced 2025-12-16 09:46:44 +00:00
init & add agent & add job
This commit is contained in:
101
predis/src/Profile/Factory.php
Normal file
101
predis/src/Profile/Factory.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Profile;
|
||||
|
||||
use Predis\ClientException;
|
||||
|
||||
/**
|
||||
* Factory class for creating profile instances from strings.
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
final class Factory
|
||||
{
|
||||
private static $profiles = array(
|
||||
'2.0' => 'Predis\Profile\RedisVersion200',
|
||||
'2.2' => 'Predis\Profile\RedisVersion220',
|
||||
'2.4' => 'Predis\Profile\RedisVersion240',
|
||||
'2.6' => 'Predis\Profile\RedisVersion260',
|
||||
'2.8' => 'Predis\Profile\RedisVersion280',
|
||||
'3.0' => 'Predis\Profile\RedisVersion300',
|
||||
'3.2' => 'Predis\Profile\RedisVersion320',
|
||||
'dev' => 'Predis\Profile\RedisUnstable',
|
||||
'default' => 'Predis\Profile\RedisVersion320',
|
||||
);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function __construct()
|
||||
{
|
||||
// NOOP
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default server profile.
|
||||
*
|
||||
* @return ProfileInterface
|
||||
*/
|
||||
public static function getDefault()
|
||||
{
|
||||
return self::get('default');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the development server profile.
|
||||
*
|
||||
* @return ProfileInterface
|
||||
*/
|
||||
public static function getDevelopment()
|
||||
{
|
||||
return self::get('dev');
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a new server profile.
|
||||
*
|
||||
* @param string $alias Profile version or alias.
|
||||
* @param string $class FQN of a class implementing Predis\Profile\ProfileInterface.
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public static function define($alias, $class)
|
||||
{
|
||||
$reflection = new \ReflectionClass($class);
|
||||
|
||||
if (!$reflection->isSubclassOf('Predis\Profile\ProfileInterface')) {
|
||||
throw new \InvalidArgumentException("The class '$class' is not a valid profile class.");
|
||||
}
|
||||
|
||||
self::$profiles[$alias] = $class;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the specified server profile.
|
||||
*
|
||||
* @param string $version Profile version or alias.
|
||||
*
|
||||
* @throws ClientException
|
||||
*
|
||||
* @return ProfileInterface
|
||||
*/
|
||||
public static function get($version)
|
||||
{
|
||||
if (!isset(self::$profiles[$version])) {
|
||||
throw new ClientException("Unknown server profile: '$version'.");
|
||||
}
|
||||
|
||||
$profile = self::$profiles[$version];
|
||||
|
||||
return new $profile();
|
||||
}
|
||||
}
|
||||
59
predis/src/Profile/ProfileInterface.php
Normal file
59
predis/src/Profile/ProfileInterface.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Profile;
|
||||
|
||||
use Predis\Command\CommandInterface;
|
||||
|
||||
/**
|
||||
* A profile defines all the features and commands supported by certain versions
|
||||
* of Redis. Instances of Predis\Client should use a server profile matching the
|
||||
* version of Redis being used.
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
interface ProfileInterface
|
||||
{
|
||||
/**
|
||||
* Returns the profile version corresponding to the Redis version.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getVersion();
|
||||
|
||||
/**
|
||||
* Checks if the profile supports the specified command.
|
||||
*
|
||||
* @param string $commandID Command ID.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function supportsCommand($commandID);
|
||||
|
||||
/**
|
||||
* Checks if the profile supports the specified list of commands.
|
||||
*
|
||||
* @param array $commandIDs List of command IDs.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function supportsCommands(array $commandIDs);
|
||||
|
||||
/**
|
||||
* Creates a new command instance.
|
||||
*
|
||||
* @param string $commandID Command ID.
|
||||
* @param array $arguments Arguments for the command.
|
||||
*
|
||||
* @return CommandInterface
|
||||
*/
|
||||
public function createCommand($commandID, array $arguments = array());
|
||||
}
|
||||
146
predis/src/Profile/RedisProfile.php
Normal file
146
predis/src/Profile/RedisProfile.php
Normal file
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Profile;
|
||||
|
||||
use Predis\ClientException;
|
||||
use Predis\Command\Processor\ProcessorInterface;
|
||||
|
||||
/**
|
||||
* Base class implementing common functionalities for Redis server profiles.
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
abstract class RedisProfile implements ProfileInterface
|
||||
{
|
||||
private $commands;
|
||||
private $processor;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->commands = $this->getSupportedCommands();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of all the commands supported by the profile and their
|
||||
* actual PHP classes.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
abstract protected function getSupportedCommands();
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supportsCommand($commandID)
|
||||
{
|
||||
return isset($this->commands[strtoupper($commandID)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supportsCommands(array $commandIDs)
|
||||
{
|
||||
foreach ($commandIDs as $commandID) {
|
||||
if (!$this->supportsCommand($commandID)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the fully-qualified name of a class representing the specified
|
||||
* command ID registered in the current server profile.
|
||||
*
|
||||
* @param string $commandID Command ID.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getCommandClass($commandID)
|
||||
{
|
||||
if (isset($this->commands[$commandID = strtoupper($commandID)])) {
|
||||
return $this->commands[$commandID];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createCommand($commandID, array $arguments = array())
|
||||
{
|
||||
$commandID = strtoupper($commandID);
|
||||
|
||||
if (!isset($this->commands[$commandID])) {
|
||||
throw new ClientException("Command '$commandID' is not a registered Redis command.");
|
||||
}
|
||||
|
||||
$commandClass = $this->commands[$commandID];
|
||||
$command = new $commandClass();
|
||||
$command->setArguments($arguments);
|
||||
|
||||
if (isset($this->processor)) {
|
||||
$this->processor->process($command);
|
||||
}
|
||||
|
||||
return $command;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines a new command in the server profile.
|
||||
*
|
||||
* @param string $commandID Command ID.
|
||||
* @param string $class Fully-qualified name of a Predis\Command\CommandInterface.
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function defineCommand($commandID, $class)
|
||||
{
|
||||
$reflection = new \ReflectionClass($class);
|
||||
|
||||
if (!$reflection->isSubclassOf('Predis\Command\CommandInterface')) {
|
||||
throw new \InvalidArgumentException("The class '$class' is not a valid command class.");
|
||||
}
|
||||
|
||||
$this->commands[strtoupper($commandID)] = $class;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setProcessor(ProcessorInterface $processor = null)
|
||||
{
|
||||
$this->processor = $processor;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getProcessor()
|
||||
{
|
||||
return $this->processor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the version of server profile as its string representation.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return $this->getVersion();
|
||||
}
|
||||
}
|
||||
38
predis/src/Profile/RedisUnstable.php
Normal file
38
predis/src/Profile/RedisUnstable.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Profile;
|
||||
|
||||
/**
|
||||
* Server profile for the current unstable version of Redis.
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
class RedisUnstable extends RedisVersion320
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return '3.2';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSupportedCommands()
|
||||
{
|
||||
return array_merge(parent::getSupportedCommands(), array(
|
||||
// EMPTY
|
||||
));
|
||||
}
|
||||
}
|
||||
173
predis/src/Profile/RedisVersion200.php
Normal file
173
predis/src/Profile/RedisVersion200.php
Normal file
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Profile;
|
||||
|
||||
/**
|
||||
* Server profile for Redis 2.0.
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
class RedisVersion200 extends RedisProfile
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return '2.0';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSupportedCommands()
|
||||
{
|
||||
return array(
|
||||
/* ---------------- Redis 1.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'EXISTS' => 'Predis\Command\KeyExists',
|
||||
'DEL' => 'Predis\Command\KeyDelete',
|
||||
'TYPE' => 'Predis\Command\KeyType',
|
||||
'KEYS' => 'Predis\Command\KeyKeys',
|
||||
'RANDOMKEY' => 'Predis\Command\KeyRandom',
|
||||
'RENAME' => 'Predis\Command\KeyRename',
|
||||
'RENAMENX' => 'Predis\Command\KeyRenamePreserve',
|
||||
'EXPIRE' => 'Predis\Command\KeyExpire',
|
||||
'EXPIREAT' => 'Predis\Command\KeyExpireAt',
|
||||
'TTL' => 'Predis\Command\KeyTimeToLive',
|
||||
'MOVE' => 'Predis\Command\KeyMove',
|
||||
'SORT' => 'Predis\Command\KeySort',
|
||||
|
||||
/* commands operating on string values */
|
||||
'SET' => 'Predis\Command\StringSet',
|
||||
'SETNX' => 'Predis\Command\StringSetPreserve',
|
||||
'MSET' => 'Predis\Command\StringSetMultiple',
|
||||
'MSETNX' => 'Predis\Command\StringSetMultiplePreserve',
|
||||
'GET' => 'Predis\Command\StringGet',
|
||||
'MGET' => 'Predis\Command\StringGetMultiple',
|
||||
'GETSET' => 'Predis\Command\StringGetSet',
|
||||
'INCR' => 'Predis\Command\StringIncrement',
|
||||
'INCRBY' => 'Predis\Command\StringIncrementBy',
|
||||
'DECR' => 'Predis\Command\StringDecrement',
|
||||
'DECRBY' => 'Predis\Command\StringDecrementBy',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSH' => 'Predis\Command\ListPushTail',
|
||||
'LPUSH' => 'Predis\Command\ListPushHead',
|
||||
'LLEN' => 'Predis\Command\ListLength',
|
||||
'LRANGE' => 'Predis\Command\ListRange',
|
||||
'LTRIM' => 'Predis\Command\ListTrim',
|
||||
'LINDEX' => 'Predis\Command\ListIndex',
|
||||
'LSET' => 'Predis\Command\ListSet',
|
||||
'LREM' => 'Predis\Command\ListRemove',
|
||||
'LPOP' => 'Predis\Command\ListPopFirst',
|
||||
'RPOP' => 'Predis\Command\ListPopLast',
|
||||
'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead',
|
||||
|
||||
/* commands operating on sets */
|
||||
'SADD' => 'Predis\Command\SetAdd',
|
||||
'SREM' => 'Predis\Command\SetRemove',
|
||||
'SPOP' => 'Predis\Command\SetPop',
|
||||
'SMOVE' => 'Predis\Command\SetMove',
|
||||
'SCARD' => 'Predis\Command\SetCardinality',
|
||||
'SISMEMBER' => 'Predis\Command\SetIsMember',
|
||||
'SINTER' => 'Predis\Command\SetIntersection',
|
||||
'SINTERSTORE' => 'Predis\Command\SetIntersectionStore',
|
||||
'SUNION' => 'Predis\Command\SetUnion',
|
||||
'SUNIONSTORE' => 'Predis\Command\SetUnionStore',
|
||||
'SDIFF' => 'Predis\Command\SetDifference',
|
||||
'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore',
|
||||
'SMEMBERS' => 'Predis\Command\SetMembers',
|
||||
'SRANDMEMBER' => 'Predis\Command\SetRandomMember',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZADD' => 'Predis\Command\ZSetAdd',
|
||||
'ZINCRBY' => 'Predis\Command\ZSetIncrementBy',
|
||||
'ZREM' => 'Predis\Command\ZSetRemove',
|
||||
'ZRANGE' => 'Predis\Command\ZSetRange',
|
||||
'ZREVRANGE' => 'Predis\Command\ZSetReverseRange',
|
||||
'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore',
|
||||
'ZCARD' => 'Predis\Command\ZSetCardinality',
|
||||
'ZSCORE' => 'Predis\Command\ZSetScore',
|
||||
'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore',
|
||||
|
||||
/* connection related commands */
|
||||
'PING' => 'Predis\Command\ConnectionPing',
|
||||
'AUTH' => 'Predis\Command\ConnectionAuth',
|
||||
'SELECT' => 'Predis\Command\ConnectionSelect',
|
||||
'ECHO' => 'Predis\Command\ConnectionEcho',
|
||||
'QUIT' => 'Predis\Command\ConnectionQuit',
|
||||
|
||||
/* remote server control commands */
|
||||
'INFO' => 'Predis\Command\ServerInfo',
|
||||
'SLAVEOF' => 'Predis\Command\ServerSlaveOf',
|
||||
'MONITOR' => 'Predis\Command\ServerMonitor',
|
||||
'DBSIZE' => 'Predis\Command\ServerDatabaseSize',
|
||||
'FLUSHDB' => 'Predis\Command\ServerFlushDatabase',
|
||||
'FLUSHALL' => 'Predis\Command\ServerFlushAll',
|
||||
'SAVE' => 'Predis\Command\ServerSave',
|
||||
'BGSAVE' => 'Predis\Command\ServerBackgroundSave',
|
||||
'LASTSAVE' => 'Predis\Command\ServerLastSave',
|
||||
'SHUTDOWN' => 'Predis\Command\ServerShutdown',
|
||||
'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF',
|
||||
|
||||
/* ---------------- Redis 2.0 ---------------- */
|
||||
|
||||
/* commands operating on string values */
|
||||
'SETEX' => 'Predis\Command\StringSetExpire',
|
||||
'APPEND' => 'Predis\Command\StringAppend',
|
||||
'SUBSTR' => 'Predis\Command\StringSubstr',
|
||||
|
||||
/* commands operating on lists */
|
||||
'BLPOP' => 'Predis\Command\ListPopFirstBlocking',
|
||||
'BRPOP' => 'Predis\Command\ListPopLastBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore',
|
||||
'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore',
|
||||
'ZCOUNT' => 'Predis\Command\ZSetCount',
|
||||
'ZRANK' => 'Predis\Command\ZSetRank',
|
||||
'ZREVRANK' => 'Predis\Command\ZSetReverseRank',
|
||||
'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HSET' => 'Predis\Command\HashSet',
|
||||
'HSETNX' => 'Predis\Command\HashSetPreserve',
|
||||
'HMSET' => 'Predis\Command\HashSetMultiple',
|
||||
'HINCRBY' => 'Predis\Command\HashIncrementBy',
|
||||
'HGET' => 'Predis\Command\HashGet',
|
||||
'HMGET' => 'Predis\Command\HashGetMultiple',
|
||||
'HDEL' => 'Predis\Command\HashDelete',
|
||||
'HEXISTS' => 'Predis\Command\HashExists',
|
||||
'HLEN' => 'Predis\Command\HashLength',
|
||||
'HKEYS' => 'Predis\Command\HashKeys',
|
||||
'HVALS' => 'Predis\Command\HashValues',
|
||||
'HGETALL' => 'Predis\Command\HashGetAll',
|
||||
|
||||
/* transactions */
|
||||
'MULTI' => 'Predis\Command\TransactionMulti',
|
||||
'EXEC' => 'Predis\Command\TransactionExec',
|
||||
'DISCARD' => 'Predis\Command\TransactionDiscard',
|
||||
|
||||
/* publish - subscribe */
|
||||
'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe',
|
||||
'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe',
|
||||
'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern',
|
||||
'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern',
|
||||
'PUBLISH' => 'Predis\Command\PubSubPublish',
|
||||
|
||||
/* remote server control commands */
|
||||
'CONFIG' => 'Predis\Command\ServerConfig',
|
||||
);
|
||||
}
|
||||
}
|
||||
202
predis/src/Profile/RedisVersion220.php
Normal file
202
predis/src/Profile/RedisVersion220.php
Normal file
@@ -0,0 +1,202 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Profile;
|
||||
|
||||
/**
|
||||
* Server profile for Redis 2.2.
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
class RedisVersion220 extends RedisProfile
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return '2.2';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSupportedCommands()
|
||||
{
|
||||
return array(
|
||||
/* ---------------- Redis 1.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'EXISTS' => 'Predis\Command\KeyExists',
|
||||
'DEL' => 'Predis\Command\KeyDelete',
|
||||
'TYPE' => 'Predis\Command\KeyType',
|
||||
'KEYS' => 'Predis\Command\KeyKeys',
|
||||
'RANDOMKEY' => 'Predis\Command\KeyRandom',
|
||||
'RENAME' => 'Predis\Command\KeyRename',
|
||||
'RENAMENX' => 'Predis\Command\KeyRenamePreserve',
|
||||
'EXPIRE' => 'Predis\Command\KeyExpire',
|
||||
'EXPIREAT' => 'Predis\Command\KeyExpireAt',
|
||||
'TTL' => 'Predis\Command\KeyTimeToLive',
|
||||
'MOVE' => 'Predis\Command\KeyMove',
|
||||
'SORT' => 'Predis\Command\KeySort',
|
||||
|
||||
/* commands operating on string values */
|
||||
'SET' => 'Predis\Command\StringSet',
|
||||
'SETNX' => 'Predis\Command\StringSetPreserve',
|
||||
'MSET' => 'Predis\Command\StringSetMultiple',
|
||||
'MSETNX' => 'Predis\Command\StringSetMultiplePreserve',
|
||||
'GET' => 'Predis\Command\StringGet',
|
||||
'MGET' => 'Predis\Command\StringGetMultiple',
|
||||
'GETSET' => 'Predis\Command\StringGetSet',
|
||||
'INCR' => 'Predis\Command\StringIncrement',
|
||||
'INCRBY' => 'Predis\Command\StringIncrementBy',
|
||||
'DECR' => 'Predis\Command\StringDecrement',
|
||||
'DECRBY' => 'Predis\Command\StringDecrementBy',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSH' => 'Predis\Command\ListPushTail',
|
||||
'LPUSH' => 'Predis\Command\ListPushHead',
|
||||
'LLEN' => 'Predis\Command\ListLength',
|
||||
'LRANGE' => 'Predis\Command\ListRange',
|
||||
'LTRIM' => 'Predis\Command\ListTrim',
|
||||
'LINDEX' => 'Predis\Command\ListIndex',
|
||||
'LSET' => 'Predis\Command\ListSet',
|
||||
'LREM' => 'Predis\Command\ListRemove',
|
||||
'LPOP' => 'Predis\Command\ListPopFirst',
|
||||
'RPOP' => 'Predis\Command\ListPopLast',
|
||||
'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead',
|
||||
|
||||
/* commands operating on sets */
|
||||
'SADD' => 'Predis\Command\SetAdd',
|
||||
'SREM' => 'Predis\Command\SetRemove',
|
||||
'SPOP' => 'Predis\Command\SetPop',
|
||||
'SMOVE' => 'Predis\Command\SetMove',
|
||||
'SCARD' => 'Predis\Command\SetCardinality',
|
||||
'SISMEMBER' => 'Predis\Command\SetIsMember',
|
||||
'SINTER' => 'Predis\Command\SetIntersection',
|
||||
'SINTERSTORE' => 'Predis\Command\SetIntersectionStore',
|
||||
'SUNION' => 'Predis\Command\SetUnion',
|
||||
'SUNIONSTORE' => 'Predis\Command\SetUnionStore',
|
||||
'SDIFF' => 'Predis\Command\SetDifference',
|
||||
'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore',
|
||||
'SMEMBERS' => 'Predis\Command\SetMembers',
|
||||
'SRANDMEMBER' => 'Predis\Command\SetRandomMember',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZADD' => 'Predis\Command\ZSetAdd',
|
||||
'ZINCRBY' => 'Predis\Command\ZSetIncrementBy',
|
||||
'ZREM' => 'Predis\Command\ZSetRemove',
|
||||
'ZRANGE' => 'Predis\Command\ZSetRange',
|
||||
'ZREVRANGE' => 'Predis\Command\ZSetReverseRange',
|
||||
'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore',
|
||||
'ZCARD' => 'Predis\Command\ZSetCardinality',
|
||||
'ZSCORE' => 'Predis\Command\ZSetScore',
|
||||
'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore',
|
||||
|
||||
/* connection related commands */
|
||||
'PING' => 'Predis\Command\ConnectionPing',
|
||||
'AUTH' => 'Predis\Command\ConnectionAuth',
|
||||
'SELECT' => 'Predis\Command\ConnectionSelect',
|
||||
'ECHO' => 'Predis\Command\ConnectionEcho',
|
||||
'QUIT' => 'Predis\Command\ConnectionQuit',
|
||||
|
||||
/* remote server control commands */
|
||||
'INFO' => 'Predis\Command\ServerInfo',
|
||||
'SLAVEOF' => 'Predis\Command\ServerSlaveOf',
|
||||
'MONITOR' => 'Predis\Command\ServerMonitor',
|
||||
'DBSIZE' => 'Predis\Command\ServerDatabaseSize',
|
||||
'FLUSHDB' => 'Predis\Command\ServerFlushDatabase',
|
||||
'FLUSHALL' => 'Predis\Command\ServerFlushAll',
|
||||
'SAVE' => 'Predis\Command\ServerSave',
|
||||
'BGSAVE' => 'Predis\Command\ServerBackgroundSave',
|
||||
'LASTSAVE' => 'Predis\Command\ServerLastSave',
|
||||
'SHUTDOWN' => 'Predis\Command\ServerShutdown',
|
||||
'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF',
|
||||
|
||||
/* ---------------- Redis 2.0 ---------------- */
|
||||
|
||||
/* commands operating on string values */
|
||||
'SETEX' => 'Predis\Command\StringSetExpire',
|
||||
'APPEND' => 'Predis\Command\StringAppend',
|
||||
'SUBSTR' => 'Predis\Command\StringSubstr',
|
||||
|
||||
/* commands operating on lists */
|
||||
'BLPOP' => 'Predis\Command\ListPopFirstBlocking',
|
||||
'BRPOP' => 'Predis\Command\ListPopLastBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore',
|
||||
'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore',
|
||||
'ZCOUNT' => 'Predis\Command\ZSetCount',
|
||||
'ZRANK' => 'Predis\Command\ZSetRank',
|
||||
'ZREVRANK' => 'Predis\Command\ZSetReverseRank',
|
||||
'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HSET' => 'Predis\Command\HashSet',
|
||||
'HSETNX' => 'Predis\Command\HashSetPreserve',
|
||||
'HMSET' => 'Predis\Command\HashSetMultiple',
|
||||
'HINCRBY' => 'Predis\Command\HashIncrementBy',
|
||||
'HGET' => 'Predis\Command\HashGet',
|
||||
'HMGET' => 'Predis\Command\HashGetMultiple',
|
||||
'HDEL' => 'Predis\Command\HashDelete',
|
||||
'HEXISTS' => 'Predis\Command\HashExists',
|
||||
'HLEN' => 'Predis\Command\HashLength',
|
||||
'HKEYS' => 'Predis\Command\HashKeys',
|
||||
'HVALS' => 'Predis\Command\HashValues',
|
||||
'HGETALL' => 'Predis\Command\HashGetAll',
|
||||
|
||||
/* transactions */
|
||||
'MULTI' => 'Predis\Command\TransactionMulti',
|
||||
'EXEC' => 'Predis\Command\TransactionExec',
|
||||
'DISCARD' => 'Predis\Command\TransactionDiscard',
|
||||
|
||||
/* publish - subscribe */
|
||||
'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe',
|
||||
'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe',
|
||||
'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern',
|
||||
'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern',
|
||||
'PUBLISH' => 'Predis\Command\PubSubPublish',
|
||||
|
||||
/* remote server control commands */
|
||||
'CONFIG' => 'Predis\Command\ServerConfig',
|
||||
|
||||
/* ---------------- Redis 2.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'PERSIST' => 'Predis\Command\KeyPersist',
|
||||
|
||||
/* commands operating on string values */
|
||||
'STRLEN' => 'Predis\Command\StringStrlen',
|
||||
'SETRANGE' => 'Predis\Command\StringSetRange',
|
||||
'GETRANGE' => 'Predis\Command\StringGetRange',
|
||||
'SETBIT' => 'Predis\Command\StringSetBit',
|
||||
'GETBIT' => 'Predis\Command\StringGetBit',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSHX' => 'Predis\Command\ListPushTailX',
|
||||
'LPUSHX' => 'Predis\Command\ListPushHeadX',
|
||||
'LINSERT' => 'Predis\Command\ListInsert',
|
||||
'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore',
|
||||
|
||||
/* transactions */
|
||||
'WATCH' => 'Predis\Command\TransactionWatch',
|
||||
'UNWATCH' => 'Predis\Command\TransactionUnwatch',
|
||||
|
||||
/* remote server control commands */
|
||||
'OBJECT' => 'Predis\Command\ServerObject',
|
||||
'SLOWLOG' => 'Predis\Command\ServerSlowlog',
|
||||
);
|
||||
}
|
||||
}
|
||||
207
predis/src/Profile/RedisVersion240.php
Normal file
207
predis/src/Profile/RedisVersion240.php
Normal file
@@ -0,0 +1,207 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Profile;
|
||||
|
||||
/**
|
||||
* Server profile for Redis 2.4.
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
class RedisVersion240 extends RedisProfile
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return '2.4';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSupportedCommands()
|
||||
{
|
||||
return array(
|
||||
/* ---------------- Redis 1.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'EXISTS' => 'Predis\Command\KeyExists',
|
||||
'DEL' => 'Predis\Command\KeyDelete',
|
||||
'TYPE' => 'Predis\Command\KeyType',
|
||||
'KEYS' => 'Predis\Command\KeyKeys',
|
||||
'RANDOMKEY' => 'Predis\Command\KeyRandom',
|
||||
'RENAME' => 'Predis\Command\KeyRename',
|
||||
'RENAMENX' => 'Predis\Command\KeyRenamePreserve',
|
||||
'EXPIRE' => 'Predis\Command\KeyExpire',
|
||||
'EXPIREAT' => 'Predis\Command\KeyExpireAt',
|
||||
'TTL' => 'Predis\Command\KeyTimeToLive',
|
||||
'MOVE' => 'Predis\Command\KeyMove',
|
||||
'SORT' => 'Predis\Command\KeySort',
|
||||
|
||||
/* commands operating on string values */
|
||||
'SET' => 'Predis\Command\StringSet',
|
||||
'SETNX' => 'Predis\Command\StringSetPreserve',
|
||||
'MSET' => 'Predis\Command\StringSetMultiple',
|
||||
'MSETNX' => 'Predis\Command\StringSetMultiplePreserve',
|
||||
'GET' => 'Predis\Command\StringGet',
|
||||
'MGET' => 'Predis\Command\StringGetMultiple',
|
||||
'GETSET' => 'Predis\Command\StringGetSet',
|
||||
'INCR' => 'Predis\Command\StringIncrement',
|
||||
'INCRBY' => 'Predis\Command\StringIncrementBy',
|
||||
'DECR' => 'Predis\Command\StringDecrement',
|
||||
'DECRBY' => 'Predis\Command\StringDecrementBy',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSH' => 'Predis\Command\ListPushTail',
|
||||
'LPUSH' => 'Predis\Command\ListPushHead',
|
||||
'LLEN' => 'Predis\Command\ListLength',
|
||||
'LRANGE' => 'Predis\Command\ListRange',
|
||||
'LTRIM' => 'Predis\Command\ListTrim',
|
||||
'LINDEX' => 'Predis\Command\ListIndex',
|
||||
'LSET' => 'Predis\Command\ListSet',
|
||||
'LREM' => 'Predis\Command\ListRemove',
|
||||
'LPOP' => 'Predis\Command\ListPopFirst',
|
||||
'RPOP' => 'Predis\Command\ListPopLast',
|
||||
'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead',
|
||||
|
||||
/* commands operating on sets */
|
||||
'SADD' => 'Predis\Command\SetAdd',
|
||||
'SREM' => 'Predis\Command\SetRemove',
|
||||
'SPOP' => 'Predis\Command\SetPop',
|
||||
'SMOVE' => 'Predis\Command\SetMove',
|
||||
'SCARD' => 'Predis\Command\SetCardinality',
|
||||
'SISMEMBER' => 'Predis\Command\SetIsMember',
|
||||
'SINTER' => 'Predis\Command\SetIntersection',
|
||||
'SINTERSTORE' => 'Predis\Command\SetIntersectionStore',
|
||||
'SUNION' => 'Predis\Command\SetUnion',
|
||||
'SUNIONSTORE' => 'Predis\Command\SetUnionStore',
|
||||
'SDIFF' => 'Predis\Command\SetDifference',
|
||||
'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore',
|
||||
'SMEMBERS' => 'Predis\Command\SetMembers',
|
||||
'SRANDMEMBER' => 'Predis\Command\SetRandomMember',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZADD' => 'Predis\Command\ZSetAdd',
|
||||
'ZINCRBY' => 'Predis\Command\ZSetIncrementBy',
|
||||
'ZREM' => 'Predis\Command\ZSetRemove',
|
||||
'ZRANGE' => 'Predis\Command\ZSetRange',
|
||||
'ZREVRANGE' => 'Predis\Command\ZSetReverseRange',
|
||||
'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore',
|
||||
'ZCARD' => 'Predis\Command\ZSetCardinality',
|
||||
'ZSCORE' => 'Predis\Command\ZSetScore',
|
||||
'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore',
|
||||
|
||||
/* connection related commands */
|
||||
'PING' => 'Predis\Command\ConnectionPing',
|
||||
'AUTH' => 'Predis\Command\ConnectionAuth',
|
||||
'SELECT' => 'Predis\Command\ConnectionSelect',
|
||||
'ECHO' => 'Predis\Command\ConnectionEcho',
|
||||
'QUIT' => 'Predis\Command\ConnectionQuit',
|
||||
|
||||
/* remote server control commands */
|
||||
'INFO' => 'Predis\Command\ServerInfo',
|
||||
'SLAVEOF' => 'Predis\Command\ServerSlaveOf',
|
||||
'MONITOR' => 'Predis\Command\ServerMonitor',
|
||||
'DBSIZE' => 'Predis\Command\ServerDatabaseSize',
|
||||
'FLUSHDB' => 'Predis\Command\ServerFlushDatabase',
|
||||
'FLUSHALL' => 'Predis\Command\ServerFlushAll',
|
||||
'SAVE' => 'Predis\Command\ServerSave',
|
||||
'BGSAVE' => 'Predis\Command\ServerBackgroundSave',
|
||||
'LASTSAVE' => 'Predis\Command\ServerLastSave',
|
||||
'SHUTDOWN' => 'Predis\Command\ServerShutdown',
|
||||
'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF',
|
||||
|
||||
/* ---------------- Redis 2.0 ---------------- */
|
||||
|
||||
/* commands operating on string values */
|
||||
'SETEX' => 'Predis\Command\StringSetExpire',
|
||||
'APPEND' => 'Predis\Command\StringAppend',
|
||||
'SUBSTR' => 'Predis\Command\StringSubstr',
|
||||
|
||||
/* commands operating on lists */
|
||||
'BLPOP' => 'Predis\Command\ListPopFirstBlocking',
|
||||
'BRPOP' => 'Predis\Command\ListPopLastBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore',
|
||||
'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore',
|
||||
'ZCOUNT' => 'Predis\Command\ZSetCount',
|
||||
'ZRANK' => 'Predis\Command\ZSetRank',
|
||||
'ZREVRANK' => 'Predis\Command\ZSetReverseRank',
|
||||
'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HSET' => 'Predis\Command\HashSet',
|
||||
'HSETNX' => 'Predis\Command\HashSetPreserve',
|
||||
'HMSET' => 'Predis\Command\HashSetMultiple',
|
||||
'HINCRBY' => 'Predis\Command\HashIncrementBy',
|
||||
'HGET' => 'Predis\Command\HashGet',
|
||||
'HMGET' => 'Predis\Command\HashGetMultiple',
|
||||
'HDEL' => 'Predis\Command\HashDelete',
|
||||
'HEXISTS' => 'Predis\Command\HashExists',
|
||||
'HLEN' => 'Predis\Command\HashLength',
|
||||
'HKEYS' => 'Predis\Command\HashKeys',
|
||||
'HVALS' => 'Predis\Command\HashValues',
|
||||
'HGETALL' => 'Predis\Command\HashGetAll',
|
||||
|
||||
/* transactions */
|
||||
'MULTI' => 'Predis\Command\TransactionMulti',
|
||||
'EXEC' => 'Predis\Command\TransactionExec',
|
||||
'DISCARD' => 'Predis\Command\TransactionDiscard',
|
||||
|
||||
/* publish - subscribe */
|
||||
'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe',
|
||||
'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe',
|
||||
'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern',
|
||||
'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern',
|
||||
'PUBLISH' => 'Predis\Command\PubSubPublish',
|
||||
|
||||
/* remote server control commands */
|
||||
'CONFIG' => 'Predis\Command\ServerConfig',
|
||||
|
||||
/* ---------------- Redis 2.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'PERSIST' => 'Predis\Command\KeyPersist',
|
||||
|
||||
/* commands operating on string values */
|
||||
'STRLEN' => 'Predis\Command\StringStrlen',
|
||||
'SETRANGE' => 'Predis\Command\StringSetRange',
|
||||
'GETRANGE' => 'Predis\Command\StringGetRange',
|
||||
'SETBIT' => 'Predis\Command\StringSetBit',
|
||||
'GETBIT' => 'Predis\Command\StringGetBit',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSHX' => 'Predis\Command\ListPushTailX',
|
||||
'LPUSHX' => 'Predis\Command\ListPushHeadX',
|
||||
'LINSERT' => 'Predis\Command\ListInsert',
|
||||
'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore',
|
||||
|
||||
/* transactions */
|
||||
'WATCH' => 'Predis\Command\TransactionWatch',
|
||||
'UNWATCH' => 'Predis\Command\TransactionUnwatch',
|
||||
|
||||
/* remote server control commands */
|
||||
'OBJECT' => 'Predis\Command\ServerObject',
|
||||
'SLOWLOG' => 'Predis\Command\ServerSlowlog',
|
||||
|
||||
/* ---------------- Redis 2.4 ---------------- */
|
||||
|
||||
/* remote server control commands */
|
||||
'CLIENT' => 'Predis\Command\ServerClient',
|
||||
);
|
||||
}
|
||||
}
|
||||
235
predis/src/Profile/RedisVersion260.php
Normal file
235
predis/src/Profile/RedisVersion260.php
Normal file
@@ -0,0 +1,235 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Profile;
|
||||
|
||||
/**
|
||||
* Server profile for Redis 2.6.
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
class RedisVersion260 extends RedisProfile
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return '2.6';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSupportedCommands()
|
||||
{
|
||||
return array(
|
||||
/* ---------------- Redis 1.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'EXISTS' => 'Predis\Command\KeyExists',
|
||||
'DEL' => 'Predis\Command\KeyDelete',
|
||||
'TYPE' => 'Predis\Command\KeyType',
|
||||
'KEYS' => 'Predis\Command\KeyKeys',
|
||||
'RANDOMKEY' => 'Predis\Command\KeyRandom',
|
||||
'RENAME' => 'Predis\Command\KeyRename',
|
||||
'RENAMENX' => 'Predis\Command\KeyRenamePreserve',
|
||||
'EXPIRE' => 'Predis\Command\KeyExpire',
|
||||
'EXPIREAT' => 'Predis\Command\KeyExpireAt',
|
||||
'TTL' => 'Predis\Command\KeyTimeToLive',
|
||||
'MOVE' => 'Predis\Command\KeyMove',
|
||||
'SORT' => 'Predis\Command\KeySort',
|
||||
'DUMP' => 'Predis\Command\KeyDump',
|
||||
'RESTORE' => 'Predis\Command\KeyRestore',
|
||||
|
||||
/* commands operating on string values */
|
||||
'SET' => 'Predis\Command\StringSet',
|
||||
'SETNX' => 'Predis\Command\StringSetPreserve',
|
||||
'MSET' => 'Predis\Command\StringSetMultiple',
|
||||
'MSETNX' => 'Predis\Command\StringSetMultiplePreserve',
|
||||
'GET' => 'Predis\Command\StringGet',
|
||||
'MGET' => 'Predis\Command\StringGetMultiple',
|
||||
'GETSET' => 'Predis\Command\StringGetSet',
|
||||
'INCR' => 'Predis\Command\StringIncrement',
|
||||
'INCRBY' => 'Predis\Command\StringIncrementBy',
|
||||
'DECR' => 'Predis\Command\StringDecrement',
|
||||
'DECRBY' => 'Predis\Command\StringDecrementBy',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSH' => 'Predis\Command\ListPushTail',
|
||||
'LPUSH' => 'Predis\Command\ListPushHead',
|
||||
'LLEN' => 'Predis\Command\ListLength',
|
||||
'LRANGE' => 'Predis\Command\ListRange',
|
||||
'LTRIM' => 'Predis\Command\ListTrim',
|
||||
'LINDEX' => 'Predis\Command\ListIndex',
|
||||
'LSET' => 'Predis\Command\ListSet',
|
||||
'LREM' => 'Predis\Command\ListRemove',
|
||||
'LPOP' => 'Predis\Command\ListPopFirst',
|
||||
'RPOP' => 'Predis\Command\ListPopLast',
|
||||
'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead',
|
||||
|
||||
/* commands operating on sets */
|
||||
'SADD' => 'Predis\Command\SetAdd',
|
||||
'SREM' => 'Predis\Command\SetRemove',
|
||||
'SPOP' => 'Predis\Command\SetPop',
|
||||
'SMOVE' => 'Predis\Command\SetMove',
|
||||
'SCARD' => 'Predis\Command\SetCardinality',
|
||||
'SISMEMBER' => 'Predis\Command\SetIsMember',
|
||||
'SINTER' => 'Predis\Command\SetIntersection',
|
||||
'SINTERSTORE' => 'Predis\Command\SetIntersectionStore',
|
||||
'SUNION' => 'Predis\Command\SetUnion',
|
||||
'SUNIONSTORE' => 'Predis\Command\SetUnionStore',
|
||||
'SDIFF' => 'Predis\Command\SetDifference',
|
||||
'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore',
|
||||
'SMEMBERS' => 'Predis\Command\SetMembers',
|
||||
'SRANDMEMBER' => 'Predis\Command\SetRandomMember',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZADD' => 'Predis\Command\ZSetAdd',
|
||||
'ZINCRBY' => 'Predis\Command\ZSetIncrementBy',
|
||||
'ZREM' => 'Predis\Command\ZSetRemove',
|
||||
'ZRANGE' => 'Predis\Command\ZSetRange',
|
||||
'ZREVRANGE' => 'Predis\Command\ZSetReverseRange',
|
||||
'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore',
|
||||
'ZCARD' => 'Predis\Command\ZSetCardinality',
|
||||
'ZSCORE' => 'Predis\Command\ZSetScore',
|
||||
'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore',
|
||||
|
||||
/* connection related commands */
|
||||
'PING' => 'Predis\Command\ConnectionPing',
|
||||
'AUTH' => 'Predis\Command\ConnectionAuth',
|
||||
'SELECT' => 'Predis\Command\ConnectionSelect',
|
||||
'ECHO' => 'Predis\Command\ConnectionEcho',
|
||||
'QUIT' => 'Predis\Command\ConnectionQuit',
|
||||
|
||||
/* remote server control commands */
|
||||
'INFO' => 'Predis\Command\ServerInfoV26x',
|
||||
'SLAVEOF' => 'Predis\Command\ServerSlaveOf',
|
||||
'MONITOR' => 'Predis\Command\ServerMonitor',
|
||||
'DBSIZE' => 'Predis\Command\ServerDatabaseSize',
|
||||
'FLUSHDB' => 'Predis\Command\ServerFlushDatabase',
|
||||
'FLUSHALL' => 'Predis\Command\ServerFlushAll',
|
||||
'SAVE' => 'Predis\Command\ServerSave',
|
||||
'BGSAVE' => 'Predis\Command\ServerBackgroundSave',
|
||||
'LASTSAVE' => 'Predis\Command\ServerLastSave',
|
||||
'SHUTDOWN' => 'Predis\Command\ServerShutdown',
|
||||
'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF',
|
||||
|
||||
/* ---------------- Redis 2.0 ---------------- */
|
||||
|
||||
/* commands operating on string values */
|
||||
'SETEX' => 'Predis\Command\StringSetExpire',
|
||||
'APPEND' => 'Predis\Command\StringAppend',
|
||||
'SUBSTR' => 'Predis\Command\StringSubstr',
|
||||
|
||||
/* commands operating on lists */
|
||||
'BLPOP' => 'Predis\Command\ListPopFirstBlocking',
|
||||
'BRPOP' => 'Predis\Command\ListPopLastBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore',
|
||||
'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore',
|
||||
'ZCOUNT' => 'Predis\Command\ZSetCount',
|
||||
'ZRANK' => 'Predis\Command\ZSetRank',
|
||||
'ZREVRANK' => 'Predis\Command\ZSetReverseRank',
|
||||
'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HSET' => 'Predis\Command\HashSet',
|
||||
'HSETNX' => 'Predis\Command\HashSetPreserve',
|
||||
'HMSET' => 'Predis\Command\HashSetMultiple',
|
||||
'HINCRBY' => 'Predis\Command\HashIncrementBy',
|
||||
'HGET' => 'Predis\Command\HashGet',
|
||||
'HMGET' => 'Predis\Command\HashGetMultiple',
|
||||
'HDEL' => 'Predis\Command\HashDelete',
|
||||
'HEXISTS' => 'Predis\Command\HashExists',
|
||||
'HLEN' => 'Predis\Command\HashLength',
|
||||
'HKEYS' => 'Predis\Command\HashKeys',
|
||||
'HVALS' => 'Predis\Command\HashValues',
|
||||
'HGETALL' => 'Predis\Command\HashGetAll',
|
||||
|
||||
/* transactions */
|
||||
'MULTI' => 'Predis\Command\TransactionMulti',
|
||||
'EXEC' => 'Predis\Command\TransactionExec',
|
||||
'DISCARD' => 'Predis\Command\TransactionDiscard',
|
||||
|
||||
/* publish - subscribe */
|
||||
'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe',
|
||||
'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe',
|
||||
'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern',
|
||||
'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern',
|
||||
'PUBLISH' => 'Predis\Command\PubSubPublish',
|
||||
|
||||
/* remote server control commands */
|
||||
'CONFIG' => 'Predis\Command\ServerConfig',
|
||||
|
||||
/* ---------------- Redis 2.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'PERSIST' => 'Predis\Command\KeyPersist',
|
||||
|
||||
/* commands operating on string values */
|
||||
'STRLEN' => 'Predis\Command\StringStrlen',
|
||||
'SETRANGE' => 'Predis\Command\StringSetRange',
|
||||
'GETRANGE' => 'Predis\Command\StringGetRange',
|
||||
'SETBIT' => 'Predis\Command\StringSetBit',
|
||||
'GETBIT' => 'Predis\Command\StringGetBit',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSHX' => 'Predis\Command\ListPushTailX',
|
||||
'LPUSHX' => 'Predis\Command\ListPushHeadX',
|
||||
'LINSERT' => 'Predis\Command\ListInsert',
|
||||
'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore',
|
||||
|
||||
/* transactions */
|
||||
'WATCH' => 'Predis\Command\TransactionWatch',
|
||||
'UNWATCH' => 'Predis\Command\TransactionUnwatch',
|
||||
|
||||
/* remote server control commands */
|
||||
'OBJECT' => 'Predis\Command\ServerObject',
|
||||
'SLOWLOG' => 'Predis\Command\ServerSlowlog',
|
||||
|
||||
/* ---------------- Redis 2.4 ---------------- */
|
||||
|
||||
/* remote server control commands */
|
||||
'CLIENT' => 'Predis\Command\ServerClient',
|
||||
|
||||
/* ---------------- Redis 2.6 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'PTTL' => 'Predis\Command\KeyPreciseTimeToLive',
|
||||
'PEXPIRE' => 'Predis\Command\KeyPreciseExpire',
|
||||
'PEXPIREAT' => 'Predis\Command\KeyPreciseExpireAt',
|
||||
'MIGRATE' => 'Predis\Command\KeyMigrate',
|
||||
|
||||
/* commands operating on string values */
|
||||
'PSETEX' => 'Predis\Command\StringPreciseSetExpire',
|
||||
'INCRBYFLOAT' => 'Predis\Command\StringIncrementByFloat',
|
||||
'BITOP' => 'Predis\Command\StringBitOp',
|
||||
'BITCOUNT' => 'Predis\Command\StringBitCount',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HINCRBYFLOAT' => 'Predis\Command\HashIncrementByFloat',
|
||||
|
||||
/* scripting */
|
||||
'EVAL' => 'Predis\Command\ServerEval',
|
||||
'EVALSHA' => 'Predis\Command\ServerEvalSHA',
|
||||
'SCRIPT' => 'Predis\Command\ServerScript',
|
||||
|
||||
/* remote server control commands */
|
||||
'TIME' => 'Predis\Command\ServerTime',
|
||||
'SENTINEL' => 'Predis\Command\ServerSentinel',
|
||||
);
|
||||
}
|
||||
}
|
||||
267
predis/src/Profile/RedisVersion280.php
Normal file
267
predis/src/Profile/RedisVersion280.php
Normal file
@@ -0,0 +1,267 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Profile;
|
||||
|
||||
/**
|
||||
* Server profile for Redis 2.8.
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
class RedisVersion280 extends RedisProfile
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return '2.8';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSupportedCommands()
|
||||
{
|
||||
return array(
|
||||
/* ---------------- Redis 1.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'EXISTS' => 'Predis\Command\KeyExists',
|
||||
'DEL' => 'Predis\Command\KeyDelete',
|
||||
'TYPE' => 'Predis\Command\KeyType',
|
||||
'KEYS' => 'Predis\Command\KeyKeys',
|
||||
'RANDOMKEY' => 'Predis\Command\KeyRandom',
|
||||
'RENAME' => 'Predis\Command\KeyRename',
|
||||
'RENAMENX' => 'Predis\Command\KeyRenamePreserve',
|
||||
'EXPIRE' => 'Predis\Command\KeyExpire',
|
||||
'EXPIREAT' => 'Predis\Command\KeyExpireAt',
|
||||
'TTL' => 'Predis\Command\KeyTimeToLive',
|
||||
'MOVE' => 'Predis\Command\KeyMove',
|
||||
'SORT' => 'Predis\Command\KeySort',
|
||||
'DUMP' => 'Predis\Command\KeyDump',
|
||||
'RESTORE' => 'Predis\Command\KeyRestore',
|
||||
|
||||
/* commands operating on string values */
|
||||
'SET' => 'Predis\Command\StringSet',
|
||||
'SETNX' => 'Predis\Command\StringSetPreserve',
|
||||
'MSET' => 'Predis\Command\StringSetMultiple',
|
||||
'MSETNX' => 'Predis\Command\StringSetMultiplePreserve',
|
||||
'GET' => 'Predis\Command\StringGet',
|
||||
'MGET' => 'Predis\Command\StringGetMultiple',
|
||||
'GETSET' => 'Predis\Command\StringGetSet',
|
||||
'INCR' => 'Predis\Command\StringIncrement',
|
||||
'INCRBY' => 'Predis\Command\StringIncrementBy',
|
||||
'DECR' => 'Predis\Command\StringDecrement',
|
||||
'DECRBY' => 'Predis\Command\StringDecrementBy',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSH' => 'Predis\Command\ListPushTail',
|
||||
'LPUSH' => 'Predis\Command\ListPushHead',
|
||||
'LLEN' => 'Predis\Command\ListLength',
|
||||
'LRANGE' => 'Predis\Command\ListRange',
|
||||
'LTRIM' => 'Predis\Command\ListTrim',
|
||||
'LINDEX' => 'Predis\Command\ListIndex',
|
||||
'LSET' => 'Predis\Command\ListSet',
|
||||
'LREM' => 'Predis\Command\ListRemove',
|
||||
'LPOP' => 'Predis\Command\ListPopFirst',
|
||||
'RPOP' => 'Predis\Command\ListPopLast',
|
||||
'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead',
|
||||
|
||||
/* commands operating on sets */
|
||||
'SADD' => 'Predis\Command\SetAdd',
|
||||
'SREM' => 'Predis\Command\SetRemove',
|
||||
'SPOP' => 'Predis\Command\SetPop',
|
||||
'SMOVE' => 'Predis\Command\SetMove',
|
||||
'SCARD' => 'Predis\Command\SetCardinality',
|
||||
'SISMEMBER' => 'Predis\Command\SetIsMember',
|
||||
'SINTER' => 'Predis\Command\SetIntersection',
|
||||
'SINTERSTORE' => 'Predis\Command\SetIntersectionStore',
|
||||
'SUNION' => 'Predis\Command\SetUnion',
|
||||
'SUNIONSTORE' => 'Predis\Command\SetUnionStore',
|
||||
'SDIFF' => 'Predis\Command\SetDifference',
|
||||
'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore',
|
||||
'SMEMBERS' => 'Predis\Command\SetMembers',
|
||||
'SRANDMEMBER' => 'Predis\Command\SetRandomMember',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZADD' => 'Predis\Command\ZSetAdd',
|
||||
'ZINCRBY' => 'Predis\Command\ZSetIncrementBy',
|
||||
'ZREM' => 'Predis\Command\ZSetRemove',
|
||||
'ZRANGE' => 'Predis\Command\ZSetRange',
|
||||
'ZREVRANGE' => 'Predis\Command\ZSetReverseRange',
|
||||
'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore',
|
||||
'ZCARD' => 'Predis\Command\ZSetCardinality',
|
||||
'ZSCORE' => 'Predis\Command\ZSetScore',
|
||||
'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore',
|
||||
|
||||
/* connection related commands */
|
||||
'PING' => 'Predis\Command\ConnectionPing',
|
||||
'AUTH' => 'Predis\Command\ConnectionAuth',
|
||||
'SELECT' => 'Predis\Command\ConnectionSelect',
|
||||
'ECHO' => 'Predis\Command\ConnectionEcho',
|
||||
'QUIT' => 'Predis\Command\ConnectionQuit',
|
||||
|
||||
/* remote server control commands */
|
||||
'INFO' => 'Predis\Command\ServerInfoV26x',
|
||||
'SLAVEOF' => 'Predis\Command\ServerSlaveOf',
|
||||
'MONITOR' => 'Predis\Command\ServerMonitor',
|
||||
'DBSIZE' => 'Predis\Command\ServerDatabaseSize',
|
||||
'FLUSHDB' => 'Predis\Command\ServerFlushDatabase',
|
||||
'FLUSHALL' => 'Predis\Command\ServerFlushAll',
|
||||
'SAVE' => 'Predis\Command\ServerSave',
|
||||
'BGSAVE' => 'Predis\Command\ServerBackgroundSave',
|
||||
'LASTSAVE' => 'Predis\Command\ServerLastSave',
|
||||
'SHUTDOWN' => 'Predis\Command\ServerShutdown',
|
||||
'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF',
|
||||
|
||||
/* ---------------- Redis 2.0 ---------------- */
|
||||
|
||||
/* commands operating on string values */
|
||||
'SETEX' => 'Predis\Command\StringSetExpire',
|
||||
'APPEND' => 'Predis\Command\StringAppend',
|
||||
'SUBSTR' => 'Predis\Command\StringSubstr',
|
||||
|
||||
/* commands operating on lists */
|
||||
'BLPOP' => 'Predis\Command\ListPopFirstBlocking',
|
||||
'BRPOP' => 'Predis\Command\ListPopLastBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore',
|
||||
'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore',
|
||||
'ZCOUNT' => 'Predis\Command\ZSetCount',
|
||||
'ZRANK' => 'Predis\Command\ZSetRank',
|
||||
'ZREVRANK' => 'Predis\Command\ZSetReverseRank',
|
||||
'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HSET' => 'Predis\Command\HashSet',
|
||||
'HSETNX' => 'Predis\Command\HashSetPreserve',
|
||||
'HMSET' => 'Predis\Command\HashSetMultiple',
|
||||
'HINCRBY' => 'Predis\Command\HashIncrementBy',
|
||||
'HGET' => 'Predis\Command\HashGet',
|
||||
'HMGET' => 'Predis\Command\HashGetMultiple',
|
||||
'HDEL' => 'Predis\Command\HashDelete',
|
||||
'HEXISTS' => 'Predis\Command\HashExists',
|
||||
'HLEN' => 'Predis\Command\HashLength',
|
||||
'HKEYS' => 'Predis\Command\HashKeys',
|
||||
'HVALS' => 'Predis\Command\HashValues',
|
||||
'HGETALL' => 'Predis\Command\HashGetAll',
|
||||
|
||||
/* transactions */
|
||||
'MULTI' => 'Predis\Command\TransactionMulti',
|
||||
'EXEC' => 'Predis\Command\TransactionExec',
|
||||
'DISCARD' => 'Predis\Command\TransactionDiscard',
|
||||
|
||||
/* publish - subscribe */
|
||||
'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe',
|
||||
'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe',
|
||||
'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern',
|
||||
'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern',
|
||||
'PUBLISH' => 'Predis\Command\PubSubPublish',
|
||||
|
||||
/* remote server control commands */
|
||||
'CONFIG' => 'Predis\Command\ServerConfig',
|
||||
|
||||
/* ---------------- Redis 2.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'PERSIST' => 'Predis\Command\KeyPersist',
|
||||
|
||||
/* commands operating on string values */
|
||||
'STRLEN' => 'Predis\Command\StringStrlen',
|
||||
'SETRANGE' => 'Predis\Command\StringSetRange',
|
||||
'GETRANGE' => 'Predis\Command\StringGetRange',
|
||||
'SETBIT' => 'Predis\Command\StringSetBit',
|
||||
'GETBIT' => 'Predis\Command\StringGetBit',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSHX' => 'Predis\Command\ListPushTailX',
|
||||
'LPUSHX' => 'Predis\Command\ListPushHeadX',
|
||||
'LINSERT' => 'Predis\Command\ListInsert',
|
||||
'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore',
|
||||
|
||||
/* transactions */
|
||||
'WATCH' => 'Predis\Command\TransactionWatch',
|
||||
'UNWATCH' => 'Predis\Command\TransactionUnwatch',
|
||||
|
||||
/* remote server control commands */
|
||||
'OBJECT' => 'Predis\Command\ServerObject',
|
||||
'SLOWLOG' => 'Predis\Command\ServerSlowlog',
|
||||
|
||||
/* ---------------- Redis 2.4 ---------------- */
|
||||
|
||||
/* remote server control commands */
|
||||
'CLIENT' => 'Predis\Command\ServerClient',
|
||||
|
||||
/* ---------------- Redis 2.6 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'PTTL' => 'Predis\Command\KeyPreciseTimeToLive',
|
||||
'PEXPIRE' => 'Predis\Command\KeyPreciseExpire',
|
||||
'PEXPIREAT' => 'Predis\Command\KeyPreciseExpireAt',
|
||||
'MIGRATE' => 'Predis\Command\KeyMigrate',
|
||||
|
||||
/* commands operating on string values */
|
||||
'PSETEX' => 'Predis\Command\StringPreciseSetExpire',
|
||||
'INCRBYFLOAT' => 'Predis\Command\StringIncrementByFloat',
|
||||
'BITOP' => 'Predis\Command\StringBitOp',
|
||||
'BITCOUNT' => 'Predis\Command\StringBitCount',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HINCRBYFLOAT' => 'Predis\Command\HashIncrementByFloat',
|
||||
|
||||
/* scripting */
|
||||
'EVAL' => 'Predis\Command\ServerEval',
|
||||
'EVALSHA' => 'Predis\Command\ServerEvalSHA',
|
||||
'SCRIPT' => 'Predis\Command\ServerScript',
|
||||
|
||||
/* remote server control commands */
|
||||
'TIME' => 'Predis\Command\ServerTime',
|
||||
'SENTINEL' => 'Predis\Command\ServerSentinel',
|
||||
|
||||
/* ---------------- Redis 2.8 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'SCAN' => 'Predis\Command\KeyScan',
|
||||
|
||||
/* commands operating on string values */
|
||||
'BITPOS' => 'Predis\Command\StringBitPos',
|
||||
|
||||
/* commands operating on sets */
|
||||
'SSCAN' => 'Predis\Command\SetScan',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZSCAN' => 'Predis\Command\ZSetScan',
|
||||
'ZLEXCOUNT' => 'Predis\Command\ZSetLexCount',
|
||||
'ZRANGEBYLEX' => 'Predis\Command\ZSetRangeByLex',
|
||||
'ZREMRANGEBYLEX' => 'Predis\Command\ZSetRemoveRangeByLex',
|
||||
'ZREVRANGEBYLEX' => 'Predis\Command\ZSetReverseRangeByLex',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HSCAN' => 'Predis\Command\HashScan',
|
||||
|
||||
/* publish - subscribe */
|
||||
'PUBSUB' => 'Predis\Command\PubSubPubsub',
|
||||
|
||||
/* commands operating on HyperLogLog */
|
||||
'PFADD' => 'Predis\Command\HyperLogLogAdd',
|
||||
'PFCOUNT' => 'Predis\Command\HyperLogLogCount',
|
||||
'PFMERGE' => 'Predis\Command\HyperLogLogMerge',
|
||||
|
||||
/* remote server control commands */
|
||||
'COMMAND' => 'Predis\Command\ServerCommand',
|
||||
);
|
||||
}
|
||||
}
|
||||
270
predis/src/Profile/RedisVersion300.php
Normal file
270
predis/src/Profile/RedisVersion300.php
Normal file
@@ -0,0 +1,270 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Profile;
|
||||
|
||||
/**
|
||||
* Server profile for Redis 3.0.
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
class RedisVersion300 extends RedisProfile
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return '3.0';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSupportedCommands()
|
||||
{
|
||||
return array(
|
||||
/* ---------------- Redis 1.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'EXISTS' => 'Predis\Command\KeyExists',
|
||||
'DEL' => 'Predis\Command\KeyDelete',
|
||||
'TYPE' => 'Predis\Command\KeyType',
|
||||
'KEYS' => 'Predis\Command\KeyKeys',
|
||||
'RANDOMKEY' => 'Predis\Command\KeyRandom',
|
||||
'RENAME' => 'Predis\Command\KeyRename',
|
||||
'RENAMENX' => 'Predis\Command\KeyRenamePreserve',
|
||||
'EXPIRE' => 'Predis\Command\KeyExpire',
|
||||
'EXPIREAT' => 'Predis\Command\KeyExpireAt',
|
||||
'TTL' => 'Predis\Command\KeyTimeToLive',
|
||||
'MOVE' => 'Predis\Command\KeyMove',
|
||||
'SORT' => 'Predis\Command\KeySort',
|
||||
'DUMP' => 'Predis\Command\KeyDump',
|
||||
'RESTORE' => 'Predis\Command\KeyRestore',
|
||||
|
||||
/* commands operating on string values */
|
||||
'SET' => 'Predis\Command\StringSet',
|
||||
'SETNX' => 'Predis\Command\StringSetPreserve',
|
||||
'MSET' => 'Predis\Command\StringSetMultiple',
|
||||
'MSETNX' => 'Predis\Command\StringSetMultiplePreserve',
|
||||
'GET' => 'Predis\Command\StringGet',
|
||||
'MGET' => 'Predis\Command\StringGetMultiple',
|
||||
'GETSET' => 'Predis\Command\StringGetSet',
|
||||
'INCR' => 'Predis\Command\StringIncrement',
|
||||
'INCRBY' => 'Predis\Command\StringIncrementBy',
|
||||
'DECR' => 'Predis\Command\StringDecrement',
|
||||
'DECRBY' => 'Predis\Command\StringDecrementBy',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSH' => 'Predis\Command\ListPushTail',
|
||||
'LPUSH' => 'Predis\Command\ListPushHead',
|
||||
'LLEN' => 'Predis\Command\ListLength',
|
||||
'LRANGE' => 'Predis\Command\ListRange',
|
||||
'LTRIM' => 'Predis\Command\ListTrim',
|
||||
'LINDEX' => 'Predis\Command\ListIndex',
|
||||
'LSET' => 'Predis\Command\ListSet',
|
||||
'LREM' => 'Predis\Command\ListRemove',
|
||||
'LPOP' => 'Predis\Command\ListPopFirst',
|
||||
'RPOP' => 'Predis\Command\ListPopLast',
|
||||
'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead',
|
||||
|
||||
/* commands operating on sets */
|
||||
'SADD' => 'Predis\Command\SetAdd',
|
||||
'SREM' => 'Predis\Command\SetRemove',
|
||||
'SPOP' => 'Predis\Command\SetPop',
|
||||
'SMOVE' => 'Predis\Command\SetMove',
|
||||
'SCARD' => 'Predis\Command\SetCardinality',
|
||||
'SISMEMBER' => 'Predis\Command\SetIsMember',
|
||||
'SINTER' => 'Predis\Command\SetIntersection',
|
||||
'SINTERSTORE' => 'Predis\Command\SetIntersectionStore',
|
||||
'SUNION' => 'Predis\Command\SetUnion',
|
||||
'SUNIONSTORE' => 'Predis\Command\SetUnionStore',
|
||||
'SDIFF' => 'Predis\Command\SetDifference',
|
||||
'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore',
|
||||
'SMEMBERS' => 'Predis\Command\SetMembers',
|
||||
'SRANDMEMBER' => 'Predis\Command\SetRandomMember',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZADD' => 'Predis\Command\ZSetAdd',
|
||||
'ZINCRBY' => 'Predis\Command\ZSetIncrementBy',
|
||||
'ZREM' => 'Predis\Command\ZSetRemove',
|
||||
'ZRANGE' => 'Predis\Command\ZSetRange',
|
||||
'ZREVRANGE' => 'Predis\Command\ZSetReverseRange',
|
||||
'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore',
|
||||
'ZCARD' => 'Predis\Command\ZSetCardinality',
|
||||
'ZSCORE' => 'Predis\Command\ZSetScore',
|
||||
'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore',
|
||||
|
||||
/* connection related commands */
|
||||
'PING' => 'Predis\Command\ConnectionPing',
|
||||
'AUTH' => 'Predis\Command\ConnectionAuth',
|
||||
'SELECT' => 'Predis\Command\ConnectionSelect',
|
||||
'ECHO' => 'Predis\Command\ConnectionEcho',
|
||||
'QUIT' => 'Predis\Command\ConnectionQuit',
|
||||
|
||||
/* remote server control commands */
|
||||
'INFO' => 'Predis\Command\ServerInfoV26x',
|
||||
'SLAVEOF' => 'Predis\Command\ServerSlaveOf',
|
||||
'MONITOR' => 'Predis\Command\ServerMonitor',
|
||||
'DBSIZE' => 'Predis\Command\ServerDatabaseSize',
|
||||
'FLUSHDB' => 'Predis\Command\ServerFlushDatabase',
|
||||
'FLUSHALL' => 'Predis\Command\ServerFlushAll',
|
||||
'SAVE' => 'Predis\Command\ServerSave',
|
||||
'BGSAVE' => 'Predis\Command\ServerBackgroundSave',
|
||||
'LASTSAVE' => 'Predis\Command\ServerLastSave',
|
||||
'SHUTDOWN' => 'Predis\Command\ServerShutdown',
|
||||
'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF',
|
||||
|
||||
/* ---------------- Redis 2.0 ---------------- */
|
||||
|
||||
/* commands operating on string values */
|
||||
'SETEX' => 'Predis\Command\StringSetExpire',
|
||||
'APPEND' => 'Predis\Command\StringAppend',
|
||||
'SUBSTR' => 'Predis\Command\StringSubstr',
|
||||
|
||||
/* commands operating on lists */
|
||||
'BLPOP' => 'Predis\Command\ListPopFirstBlocking',
|
||||
'BRPOP' => 'Predis\Command\ListPopLastBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore',
|
||||
'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore',
|
||||
'ZCOUNT' => 'Predis\Command\ZSetCount',
|
||||
'ZRANK' => 'Predis\Command\ZSetRank',
|
||||
'ZREVRANK' => 'Predis\Command\ZSetReverseRank',
|
||||
'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HSET' => 'Predis\Command\HashSet',
|
||||
'HSETNX' => 'Predis\Command\HashSetPreserve',
|
||||
'HMSET' => 'Predis\Command\HashSetMultiple',
|
||||
'HINCRBY' => 'Predis\Command\HashIncrementBy',
|
||||
'HGET' => 'Predis\Command\HashGet',
|
||||
'HMGET' => 'Predis\Command\HashGetMultiple',
|
||||
'HDEL' => 'Predis\Command\HashDelete',
|
||||
'HEXISTS' => 'Predis\Command\HashExists',
|
||||
'HLEN' => 'Predis\Command\HashLength',
|
||||
'HKEYS' => 'Predis\Command\HashKeys',
|
||||
'HVALS' => 'Predis\Command\HashValues',
|
||||
'HGETALL' => 'Predis\Command\HashGetAll',
|
||||
|
||||
/* transactions */
|
||||
'MULTI' => 'Predis\Command\TransactionMulti',
|
||||
'EXEC' => 'Predis\Command\TransactionExec',
|
||||
'DISCARD' => 'Predis\Command\TransactionDiscard',
|
||||
|
||||
/* publish - subscribe */
|
||||
'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe',
|
||||
'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe',
|
||||
'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern',
|
||||
'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern',
|
||||
'PUBLISH' => 'Predis\Command\PubSubPublish',
|
||||
|
||||
/* remote server control commands */
|
||||
'CONFIG' => 'Predis\Command\ServerConfig',
|
||||
|
||||
/* ---------------- Redis 2.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'PERSIST' => 'Predis\Command\KeyPersist',
|
||||
|
||||
/* commands operating on string values */
|
||||
'STRLEN' => 'Predis\Command\StringStrlen',
|
||||
'SETRANGE' => 'Predis\Command\StringSetRange',
|
||||
'GETRANGE' => 'Predis\Command\StringGetRange',
|
||||
'SETBIT' => 'Predis\Command\StringSetBit',
|
||||
'GETBIT' => 'Predis\Command\StringGetBit',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSHX' => 'Predis\Command\ListPushTailX',
|
||||
'LPUSHX' => 'Predis\Command\ListPushHeadX',
|
||||
'LINSERT' => 'Predis\Command\ListInsert',
|
||||
'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore',
|
||||
|
||||
/* transactions */
|
||||
'WATCH' => 'Predis\Command\TransactionWatch',
|
||||
'UNWATCH' => 'Predis\Command\TransactionUnwatch',
|
||||
|
||||
/* remote server control commands */
|
||||
'OBJECT' => 'Predis\Command\ServerObject',
|
||||
'SLOWLOG' => 'Predis\Command\ServerSlowlog',
|
||||
|
||||
/* ---------------- Redis 2.4 ---------------- */
|
||||
|
||||
/* remote server control commands */
|
||||
'CLIENT' => 'Predis\Command\ServerClient',
|
||||
|
||||
/* ---------------- Redis 2.6 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'PTTL' => 'Predis\Command\KeyPreciseTimeToLive',
|
||||
'PEXPIRE' => 'Predis\Command\KeyPreciseExpire',
|
||||
'PEXPIREAT' => 'Predis\Command\KeyPreciseExpireAt',
|
||||
'MIGRATE' => 'Predis\Command\KeyMigrate',
|
||||
|
||||
/* commands operating on string values */
|
||||
'PSETEX' => 'Predis\Command\StringPreciseSetExpire',
|
||||
'INCRBYFLOAT' => 'Predis\Command\StringIncrementByFloat',
|
||||
'BITOP' => 'Predis\Command\StringBitOp',
|
||||
'BITCOUNT' => 'Predis\Command\StringBitCount',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HINCRBYFLOAT' => 'Predis\Command\HashIncrementByFloat',
|
||||
|
||||
/* scripting */
|
||||
'EVAL' => 'Predis\Command\ServerEval',
|
||||
'EVALSHA' => 'Predis\Command\ServerEvalSHA',
|
||||
'SCRIPT' => 'Predis\Command\ServerScript',
|
||||
|
||||
/* remote server control commands */
|
||||
'TIME' => 'Predis\Command\ServerTime',
|
||||
'SENTINEL' => 'Predis\Command\ServerSentinel',
|
||||
|
||||
/* ---------------- Redis 2.8 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'SCAN' => 'Predis\Command\KeyScan',
|
||||
|
||||
/* commands operating on string values */
|
||||
'BITPOS' => 'Predis\Command\StringBitPos',
|
||||
|
||||
/* commands operating on sets */
|
||||
'SSCAN' => 'Predis\Command\SetScan',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZSCAN' => 'Predis\Command\ZSetScan',
|
||||
'ZLEXCOUNT' => 'Predis\Command\ZSetLexCount',
|
||||
'ZRANGEBYLEX' => 'Predis\Command\ZSetRangeByLex',
|
||||
'ZREMRANGEBYLEX' => 'Predis\Command\ZSetRemoveRangeByLex',
|
||||
'ZREVRANGEBYLEX' => 'Predis\Command\ZSetReverseRangeByLex',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HSCAN' => 'Predis\Command\HashScan',
|
||||
|
||||
/* publish - subscribe */
|
||||
'PUBSUB' => 'Predis\Command\PubSubPubsub',
|
||||
|
||||
/* commands operating on HyperLogLog */
|
||||
'PFADD' => 'Predis\Command\HyperLogLogAdd',
|
||||
'PFCOUNT' => 'Predis\Command\HyperLogLogCount',
|
||||
'PFMERGE' => 'Predis\Command\HyperLogLogMerge',
|
||||
|
||||
/* remote server control commands */
|
||||
'COMMAND' => 'Predis\Command\ServerCommand',
|
||||
|
||||
/* ---------------- Redis 3.0 ---------------- */
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
281
predis/src/Profile/RedisVersion320.php
Normal file
281
predis/src/Profile/RedisVersion320.php
Normal file
@@ -0,0 +1,281 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Profile;
|
||||
|
||||
/**
|
||||
* Server profile for Redis 3.0.
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
class RedisVersion320 extends RedisProfile
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return '3.2';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSupportedCommands()
|
||||
{
|
||||
return array(
|
||||
/* ---------------- Redis 1.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'EXISTS' => 'Predis\Command\KeyExists',
|
||||
'DEL' => 'Predis\Command\KeyDelete',
|
||||
'TYPE' => 'Predis\Command\KeyType',
|
||||
'KEYS' => 'Predis\Command\KeyKeys',
|
||||
'RANDOMKEY' => 'Predis\Command\KeyRandom',
|
||||
'RENAME' => 'Predis\Command\KeyRename',
|
||||
'RENAMENX' => 'Predis\Command\KeyRenamePreserve',
|
||||
'EXPIRE' => 'Predis\Command\KeyExpire',
|
||||
'EXPIREAT' => 'Predis\Command\KeyExpireAt',
|
||||
'TTL' => 'Predis\Command\KeyTimeToLive',
|
||||
'MOVE' => 'Predis\Command\KeyMove',
|
||||
'SORT' => 'Predis\Command\KeySort',
|
||||
'DUMP' => 'Predis\Command\KeyDump',
|
||||
'RESTORE' => 'Predis\Command\KeyRestore',
|
||||
|
||||
/* commands operating on string values */
|
||||
'SET' => 'Predis\Command\StringSet',
|
||||
'SETNX' => 'Predis\Command\StringSetPreserve',
|
||||
'MSET' => 'Predis\Command\StringSetMultiple',
|
||||
'MSETNX' => 'Predis\Command\StringSetMultiplePreserve',
|
||||
'GET' => 'Predis\Command\StringGet',
|
||||
'MGET' => 'Predis\Command\StringGetMultiple',
|
||||
'GETSET' => 'Predis\Command\StringGetSet',
|
||||
'INCR' => 'Predis\Command\StringIncrement',
|
||||
'INCRBY' => 'Predis\Command\StringIncrementBy',
|
||||
'DECR' => 'Predis\Command\StringDecrement',
|
||||
'DECRBY' => 'Predis\Command\StringDecrementBy',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSH' => 'Predis\Command\ListPushTail',
|
||||
'LPUSH' => 'Predis\Command\ListPushHead',
|
||||
'LLEN' => 'Predis\Command\ListLength',
|
||||
'LRANGE' => 'Predis\Command\ListRange',
|
||||
'LTRIM' => 'Predis\Command\ListTrim',
|
||||
'LINDEX' => 'Predis\Command\ListIndex',
|
||||
'LSET' => 'Predis\Command\ListSet',
|
||||
'LREM' => 'Predis\Command\ListRemove',
|
||||
'LPOP' => 'Predis\Command\ListPopFirst',
|
||||
'RPOP' => 'Predis\Command\ListPopLast',
|
||||
'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead',
|
||||
|
||||
/* commands operating on sets */
|
||||
'SADD' => 'Predis\Command\SetAdd',
|
||||
'SREM' => 'Predis\Command\SetRemove',
|
||||
'SPOP' => 'Predis\Command\SetPop',
|
||||
'SMOVE' => 'Predis\Command\SetMove',
|
||||
'SCARD' => 'Predis\Command\SetCardinality',
|
||||
'SISMEMBER' => 'Predis\Command\SetIsMember',
|
||||
'SINTER' => 'Predis\Command\SetIntersection',
|
||||
'SINTERSTORE' => 'Predis\Command\SetIntersectionStore',
|
||||
'SUNION' => 'Predis\Command\SetUnion',
|
||||
'SUNIONSTORE' => 'Predis\Command\SetUnionStore',
|
||||
'SDIFF' => 'Predis\Command\SetDifference',
|
||||
'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore',
|
||||
'SMEMBERS' => 'Predis\Command\SetMembers',
|
||||
'SRANDMEMBER' => 'Predis\Command\SetRandomMember',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZADD' => 'Predis\Command\ZSetAdd',
|
||||
'ZINCRBY' => 'Predis\Command\ZSetIncrementBy',
|
||||
'ZREM' => 'Predis\Command\ZSetRemove',
|
||||
'ZRANGE' => 'Predis\Command\ZSetRange',
|
||||
'ZREVRANGE' => 'Predis\Command\ZSetReverseRange',
|
||||
'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore',
|
||||
'ZCARD' => 'Predis\Command\ZSetCardinality',
|
||||
'ZSCORE' => 'Predis\Command\ZSetScore',
|
||||
'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore',
|
||||
|
||||
/* connection related commands */
|
||||
'PING' => 'Predis\Command\ConnectionPing',
|
||||
'AUTH' => 'Predis\Command\ConnectionAuth',
|
||||
'SELECT' => 'Predis\Command\ConnectionSelect',
|
||||
'ECHO' => 'Predis\Command\ConnectionEcho',
|
||||
'QUIT' => 'Predis\Command\ConnectionQuit',
|
||||
|
||||
/* remote server control commands */
|
||||
'INFO' => 'Predis\Command\ServerInfoV26x',
|
||||
'SLAVEOF' => 'Predis\Command\ServerSlaveOf',
|
||||
'MONITOR' => 'Predis\Command\ServerMonitor',
|
||||
'DBSIZE' => 'Predis\Command\ServerDatabaseSize',
|
||||
'FLUSHDB' => 'Predis\Command\ServerFlushDatabase',
|
||||
'FLUSHALL' => 'Predis\Command\ServerFlushAll',
|
||||
'SAVE' => 'Predis\Command\ServerSave',
|
||||
'BGSAVE' => 'Predis\Command\ServerBackgroundSave',
|
||||
'LASTSAVE' => 'Predis\Command\ServerLastSave',
|
||||
'SHUTDOWN' => 'Predis\Command\ServerShutdown',
|
||||
'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF',
|
||||
|
||||
/* ---------------- Redis 2.0 ---------------- */
|
||||
|
||||
/* commands operating on string values */
|
||||
'SETEX' => 'Predis\Command\StringSetExpire',
|
||||
'APPEND' => 'Predis\Command\StringAppend',
|
||||
'SUBSTR' => 'Predis\Command\StringSubstr',
|
||||
|
||||
/* commands operating on lists */
|
||||
'BLPOP' => 'Predis\Command\ListPopFirstBlocking',
|
||||
'BRPOP' => 'Predis\Command\ListPopLastBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore',
|
||||
'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore',
|
||||
'ZCOUNT' => 'Predis\Command\ZSetCount',
|
||||
'ZRANK' => 'Predis\Command\ZSetRank',
|
||||
'ZREVRANK' => 'Predis\Command\ZSetReverseRank',
|
||||
'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HSET' => 'Predis\Command\HashSet',
|
||||
'HSETNX' => 'Predis\Command\HashSetPreserve',
|
||||
'HMSET' => 'Predis\Command\HashSetMultiple',
|
||||
'HINCRBY' => 'Predis\Command\HashIncrementBy',
|
||||
'HGET' => 'Predis\Command\HashGet',
|
||||
'HMGET' => 'Predis\Command\HashGetMultiple',
|
||||
'HDEL' => 'Predis\Command\HashDelete',
|
||||
'HEXISTS' => 'Predis\Command\HashExists',
|
||||
'HLEN' => 'Predis\Command\HashLength',
|
||||
'HKEYS' => 'Predis\Command\HashKeys',
|
||||
'HVALS' => 'Predis\Command\HashValues',
|
||||
'HGETALL' => 'Predis\Command\HashGetAll',
|
||||
|
||||
/* transactions */
|
||||
'MULTI' => 'Predis\Command\TransactionMulti',
|
||||
'EXEC' => 'Predis\Command\TransactionExec',
|
||||
'DISCARD' => 'Predis\Command\TransactionDiscard',
|
||||
|
||||
/* publish - subscribe */
|
||||
'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe',
|
||||
'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe',
|
||||
'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern',
|
||||
'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern',
|
||||
'PUBLISH' => 'Predis\Command\PubSubPublish',
|
||||
|
||||
/* remote server control commands */
|
||||
'CONFIG' => 'Predis\Command\ServerConfig',
|
||||
|
||||
/* ---------------- Redis 2.2 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'PERSIST' => 'Predis\Command\KeyPersist',
|
||||
|
||||
/* commands operating on string values */
|
||||
'STRLEN' => 'Predis\Command\StringStrlen',
|
||||
'SETRANGE' => 'Predis\Command\StringSetRange',
|
||||
'GETRANGE' => 'Predis\Command\StringGetRange',
|
||||
'SETBIT' => 'Predis\Command\StringSetBit',
|
||||
'GETBIT' => 'Predis\Command\StringGetBit',
|
||||
|
||||
/* commands operating on lists */
|
||||
'RPUSHX' => 'Predis\Command\ListPushTailX',
|
||||
'LPUSHX' => 'Predis\Command\ListPushHeadX',
|
||||
'LINSERT' => 'Predis\Command\ListInsert',
|
||||
'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore',
|
||||
|
||||
/* transactions */
|
||||
'WATCH' => 'Predis\Command\TransactionWatch',
|
||||
'UNWATCH' => 'Predis\Command\TransactionUnwatch',
|
||||
|
||||
/* remote server control commands */
|
||||
'OBJECT' => 'Predis\Command\ServerObject',
|
||||
'SLOWLOG' => 'Predis\Command\ServerSlowlog',
|
||||
|
||||
/* ---------------- Redis 2.4 ---------------- */
|
||||
|
||||
/* remote server control commands */
|
||||
'CLIENT' => 'Predis\Command\ServerClient',
|
||||
|
||||
/* ---------------- Redis 2.6 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'PTTL' => 'Predis\Command\KeyPreciseTimeToLive',
|
||||
'PEXPIRE' => 'Predis\Command\KeyPreciseExpire',
|
||||
'PEXPIREAT' => 'Predis\Command\KeyPreciseExpireAt',
|
||||
'MIGRATE' => 'Predis\Command\KeyMigrate',
|
||||
|
||||
/* commands operating on string values */
|
||||
'PSETEX' => 'Predis\Command\StringPreciseSetExpire',
|
||||
'INCRBYFLOAT' => 'Predis\Command\StringIncrementByFloat',
|
||||
'BITOP' => 'Predis\Command\StringBitOp',
|
||||
'BITCOUNT' => 'Predis\Command\StringBitCount',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HINCRBYFLOAT' => 'Predis\Command\HashIncrementByFloat',
|
||||
|
||||
/* scripting */
|
||||
'EVAL' => 'Predis\Command\ServerEval',
|
||||
'EVALSHA' => 'Predis\Command\ServerEvalSHA',
|
||||
'SCRIPT' => 'Predis\Command\ServerScript',
|
||||
|
||||
/* remote server control commands */
|
||||
'TIME' => 'Predis\Command\ServerTime',
|
||||
'SENTINEL' => 'Predis\Command\ServerSentinel',
|
||||
|
||||
/* ---------------- Redis 2.8 ---------------- */
|
||||
|
||||
/* commands operating on the key space */
|
||||
'SCAN' => 'Predis\Command\KeyScan',
|
||||
|
||||
/* commands operating on string values */
|
||||
'BITPOS' => 'Predis\Command\StringBitPos',
|
||||
|
||||
/* commands operating on sets */
|
||||
'SSCAN' => 'Predis\Command\SetScan',
|
||||
|
||||
/* commands operating on sorted sets */
|
||||
'ZSCAN' => 'Predis\Command\ZSetScan',
|
||||
'ZLEXCOUNT' => 'Predis\Command\ZSetLexCount',
|
||||
'ZRANGEBYLEX' => 'Predis\Command\ZSetRangeByLex',
|
||||
'ZREMRANGEBYLEX' => 'Predis\Command\ZSetRemoveRangeByLex',
|
||||
'ZREVRANGEBYLEX' => 'Predis\Command\ZSetReverseRangeByLex',
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HSCAN' => 'Predis\Command\HashScan',
|
||||
|
||||
/* publish - subscribe */
|
||||
'PUBSUB' => 'Predis\Command\PubSubPubsub',
|
||||
|
||||
/* commands operating on HyperLogLog */
|
||||
'PFADD' => 'Predis\Command\HyperLogLogAdd',
|
||||
'PFCOUNT' => 'Predis\Command\HyperLogLogCount',
|
||||
'PFMERGE' => 'Predis\Command\HyperLogLogMerge',
|
||||
|
||||
/* remote server control commands */
|
||||
'COMMAND' => 'Predis\Command\ServerCommand',
|
||||
|
||||
/* ---------------- Redis 3.2 ---------------- */
|
||||
|
||||
/* commands operating on hashes */
|
||||
'HSTRLEN' => 'Predis\Command\HashStringLength',
|
||||
'BITFIELD' => 'Predis\Command\StringBitField',
|
||||
|
||||
/* commands performing geospatial operations */
|
||||
'GEOADD' => 'Predis\Command\GeospatialGeoAdd',
|
||||
'GEOHASH' => 'Predis\Command\GeospatialGeoHash',
|
||||
'GEOPOS' => 'Predis\Command\GeospatialGeoPos',
|
||||
'GEODIST' => 'Predis\Command\GeospatialGeoDist',
|
||||
'GEORADIUS' => 'Predis\Command\GeospatialGeoRadius',
|
||||
'GEORADIUSBYMEMBER' => 'Predis\Command\GeospatialGeoRadiusByMember',
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user