Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SooonerHotel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴贤德
SooonerHotel
Commits
32332aaf
Commit
32332aaf
authored
5 years ago
by
吴贤德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复Predis Profile源文件被忽略问题
parent
56bc964d
No related merge requests found
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
926 additions
and
0 deletions
+926
-0
Factory.php
SooonerHotel/App/Predis/src/Profile/Factory.php
+101
-0
ProfileInterface.php
SooonerHotel/App/Predis/src/Profile/ProfileInterface.php
+59
-0
RedisProfile.php
SooonerHotel/App/Predis/src/Profile/RedisProfile.php
+146
-0
RedisUnstable.php
SooonerHotel/App/Predis/src/Profile/RedisUnstable.php
+38
-0
RedisVersion200.php
SooonerHotel/App/Predis/src/Profile/RedisVersion200.php
+173
-0
RedisVersion220.php
SooonerHotel/App/Predis/src/Profile/RedisVersion220.php
+202
-0
RedisVersion240.php
SooonerHotel/App/Predis/src/Profile/RedisVersion240.php
+207
-0
RedisVersion260.php
SooonerHotel/App/Predis/src/Profile/RedisVersion260.php
+0
-0
RedisVersion280.php
SooonerHotel/App/Predis/src/Profile/RedisVersion280.php
+0
-0
RedisVersion300.php
SooonerHotel/App/Predis/src/Profile/RedisVersion300.php
+0
-0
RedisVersion320.php
SooonerHotel/App/Predis/src/Profile/RedisVersion320.php
+0
-0
No files found.
SooonerHotel/App/Predis/src/Profile/Factory.php
0 → 100644
View file @
32332aaf
<?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
();
}
}
This diff is collapsed.
Click to expand it.
SooonerHotel/App/Predis/src/Profile/ProfileInterface.php
0 → 100644
View file @
32332aaf
<?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
());
}
This diff is collapsed.
Click to expand it.
SooonerHotel/App/Predis/src/Profile/RedisProfile.php
0 → 100644
View file @
32332aaf
<?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
();
}
}
This diff is collapsed.
Click to expand it.
SooonerHotel/App/Predis/src/Profile/RedisUnstable.php
0 → 100644
View file @
32332aaf
<?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
));
}
}
This diff is collapsed.
Click to expand it.
SooonerHotel/App/Predis/src/Profile/RedisVersion200.php
0 → 100644
View file @
32332aaf
<?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'
,
);
}
}
This diff is collapsed.
Click to expand it.
SooonerHotel/App/Predis/src/Profile/RedisVersion220.php
0 → 100644
View file @
32332aaf
<?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'
,
);
}
}
This diff is collapsed.
Click to expand it.
SooonerHotel/App/Predis/src/Profile/RedisVersion240.php
0 → 100644
View file @
32332aaf
<?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'
,
);
}
}
This diff is collapsed.
Click to expand it.
SooonerHotel/App/Predis/src/Profile/RedisVersion260.php
0 → 100644
View file @
32332aaf
This diff is collapsed.
Click to expand it.
SooonerHotel/App/Predis/src/Profile/RedisVersion280.php
0 → 100644
View file @
32332aaf
This diff is collapsed.
Click to expand it.
SooonerHotel/App/Predis/src/Profile/RedisVersion300.php
0 → 100644
View file @
32332aaf
This diff is collapsed.
Click to expand it.
SooonerHotel/App/Predis/src/Profile/RedisVersion320.php
0 → 100644
View file @
32332aaf
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment