Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename certain namespaces, interfaces and classes.

Now we follow a Symfony2-like naming convention for namespaces, interfaces
and classes sticking with one clear rule.

- Renamed namespaces:

  - Predis\Network
  - Predis\Profiles
  - Predis\Iterators
  - Predis\Options
  - Predis\Commands
  - Predis\Commands\Processors

- Renamed interfaces:

  - Predis\IReplyObject
  - Predis\IRedisServerError
  - Predis\IConnectionFactory
  - Predis\IConnectionParameters
  - Predis\Options\IOption
  - Predis\Options\IClientOptions
  - Predis\Profile\IServerProfile
  - Predis\Pipeline\IPipelineExecutor
  - Predis\Distribution\INodeKeyGenerator
  - Predis\Distribution\IDistributionStrategy
  - Predis\Protocol\IProtocolProcessor
  - Predis\Protocol\IResponseReader
  - Predis\Protocol\IResponseHandler
  - Predis\Protocol\ICommandSerializer
  - Predis\Protocol\IComposableProtocolProcessor
  - Predis\Network\IConnection
  - Predis\Network\IConnectionSingle
  - Predis\Network\IConnectionComposable
  - Predis\Network\IConnectionCluster
  - Predis\Network\IConnectionReplication
  - Predis\Commands\ICommand
  - Predis\Commands\IPrefixable
  - Predis\Command\Processor\ICommandProcessor
  - Predis\Command\Processor\ICommandProcessorChain
  - Predis\Command\Processor\IProcessingSupport

- Renamed Classes:

  - Predis\Commands\Command
  - Predis\Network\ConnectionBase

- Classes moved to different namespaces:

  - Predis\MonitorContext

Meh
commit dc14c2967668854e3ab32469b20ceb9ffc414ff3 1 parent ce625ca
@nrk authored
Showing with 1,762 additions and 1,696 deletions.
  1. +67 −0 CHANGELOG.md
  2. +1 −1  FAQ.PERFORMANCES.md
  3. +5 −5 README.md
  4. +11 −11 bin/generate-command-test.php
  5. +5 −5 examples/CustomDistributionStrategy.php
  6. +4 −4 examples/MasterSlaveReplicationComplex.php
  7. +2 −2 examples/ServerSideScripting.php
  8. +5 −5 examples/SimpleDebuggableConnection.php
  9. +23 −23 lib/Predis/Client.php
  10. +5 −5 lib/Predis/{Commands/Command.php → Command/AbstractCommand.php}
  11. +5 −5 lib/Predis/{Commands/ICommand.php → Command/CommandInterface.php}
  12. +2 −2 lib/Predis/{Commands → Command}/ConnectionAuth.php
  13. +2 −2 lib/Predis/{Commands → Command}/ConnectionEcho.php
  14. +2 −2 lib/Predis/{Commands → Command}/ConnectionPing.php
  15. +2 −2 lib/Predis/{Commands → Command}/ConnectionQuit.php
  16. +2 −2 lib/Predis/{Commands → Command}/ConnectionSelect.php
  17. +1 −1  lib/Predis/{Commands → Command}/HashDelete.php
  18. +1 −1  lib/Predis/{Commands → Command}/HashExists.php
  19. +1 −1  lib/Predis/{Commands → Command}/HashGet.php
  20. +2 −2 lib/Predis/{Commands → Command}/HashGetAll.php
  21. +1 −1  lib/Predis/{Commands → Command}/HashGetMultiple.php
  22. +1 −1  lib/Predis/{Commands → Command}/HashIncrementBy.php
  23. +1 −1  lib/Predis/{Commands → Command}/HashIncrementByFloat.php
  24. +1 −1  lib/Predis/{Commands → Command}/HashKeys.php
  25. +1 −1  lib/Predis/{Commands → Command}/HashLength.php
  26. +1 −1  lib/Predis/{Commands → Command}/HashSet.php
  27. +1 −1  lib/Predis/{Commands → Command}/HashSetMultiple.php
  28. +1 −1  lib/Predis/{Commands → Command}/HashSetPreserve.php
  29. +1 −1  lib/Predis/{Commands → Command}/HashValues.php
  30. +2 −2 lib/Predis/{Commands → Command}/KeyDelete.php
  31. +1 −1  lib/Predis/{Commands → Command}/KeyExists.php
  32. +1 −1  lib/Predis/{Commands → Command}/KeyExpire.php
  33. +1 −1  lib/Predis/{Commands → Command}/KeyExpireAt.php
  34. +1 −1  lib/Predis/{Commands → Command}/KeyKeys.php
  35. +1 −1  lib/Predis/{Commands → Command}/KeyKeysV12x.php
  36. +1 −1  lib/Predis/{Commands → Command}/KeyMove.php
  37. +1 −1  lib/Predis/{Commands → Command}/KeyPersist.php
  38. +1 −1  lib/Predis/{Commands → Command}/KeyPreciseExpire.php
  39. +1 −1  lib/Predis/{Commands → Command}/KeyPreciseExpireAt.php
  40. +1 −1  lib/Predis/{Commands → Command}/KeyPreciseTimeToLive.php
  41. +2 −2 lib/Predis/{Commands → Command}/KeyRandom.php
  42. +2 −2 lib/Predis/{Commands → Command}/KeyRename.php
  43. +1 −1  lib/Predis/{Commands → Command}/KeyRenamePreserve.php
  44. +2 −2 lib/Predis/{Commands → Command}/KeySort.php
  45. +1 −1  lib/Predis/{Commands → Command}/KeyTimeToLive.php
  46. +1 −1  lib/Predis/{Commands → Command}/KeyType.php
  47. +1 −1  lib/Predis/{Commands → Command}/ListIndex.php
  48. +1 −1  lib/Predis/{Commands → Command}/ListInsert.php
  49. +1 −1  lib/Predis/{Commands → Command}/ListLength.php
  50. +1 −1  lib/Predis/{Commands → Command}/ListPopFirst.php
  51. +2 −2 lib/Predis/{Commands → Command}/ListPopFirstBlocking.php
  52. +1 −1  lib/Predis/{Commands → Command}/ListPopLast.php
  53. +1 −1  lib/Predis/{Commands → Command}/ListPopLastBlocking.php
  54. +2 −2 lib/Predis/{Commands → Command}/ListPopLastPushHead.php
  55. +2 −2 lib/Predis/{Commands → Command}/ListPopLastPushHeadBlocking.php
  56. +1 −1  lib/Predis/{Commands → Command}/ListPushHead.php
  57. +1 −1  lib/Predis/{Commands → Command}/ListPushHeadX.php
  58. +1 −1  lib/Predis/{Commands → Command}/ListPushTail.php
  59. +1 −1  lib/Predis/{Commands → Command}/ListPushTailX.php
  60. +1 −1  lib/Predis/{Commands → Command}/ListRange.php
  61. +1 −1  lib/Predis/{Commands → Command}/ListRemove.php
  62. +1 −1  lib/Predis/{Commands → Command}/ListSet.php
  63. +1 −1  lib/Predis/{Commands → Command}/ListTrim.php
  64. +9 −9 lib/Predis/{Commands → Command}/PrefixHelpers.php
  65. +2 −2 lib/Predis/{Commands → Command}/PrefixableCommand.php
  66. +2 −4 lib/Predis/{Commands/IPrefixable.php → Command/PrefixableCommandInterface.php}
  67. +5 −5 ...Predis/{Commands/Processors/IProcessingSupport.php → Command/Processor/CommandProcessingInterface.php}
  68. +6 −6 ...Commands/Processors/ICommandProcessorChain.php → Command/Processor/CommandProcessorChainInterface.php}
  69. +5 −5 lib/Predis/{Commands/Processors/ICommandProcessor.php → Command/Processor/CommandProcessorInterface.php}
  70. +6 −6 lib/Predis/{Commands/Processors → Command/Processor}/KeyPrefixProcessor.php
  71. +9 −9 lib/Predis/{Commands/Processors → Command/Processor}/ProcessorChain.php
  72. +1 −1  lib/Predis/{Commands → Command}/PubSubPublish.php
  73. +2 −2 lib/Predis/{Commands → Command}/PubSubSubscribe.php
  74. +1 −1  lib/Predis/{Commands → Command}/PubSubSubscribeByPattern.php
  75. +2 −2 lib/Predis/{Commands → Command}/PubSubUnsubscribe.php
  76. +1 −1  lib/Predis/{Commands → Command}/PubSubUnsubscribeByPattern.php
  77. +1 −1  lib/Predis/{Commands → Command}/ScriptedCommand.php
  78. +2 −2 lib/Predis/{Commands → Command}/ServerBackgroundRewriteAOF.php
  79. +2 −2 lib/Predis/{Commands → Command}/ServerBackgroundSave.php
  80. +2 −2 lib/Predis/{Commands → Command}/ServerClient.php
  81. +3 −3 lib/Predis/{Commands → Command}/ServerConfig.php
  82. +2 −2 lib/Predis/{Commands → Command}/ServerDatabaseSize.php
  83. +2 −2 lib/Predis/{Commands → Command}/ServerEval.php
  84. +1 −1  lib/Predis/{Commands → Command}/ServerEvalSHA.php
  85. +2 −2 lib/Predis/{Commands → Command}/ServerFlushAll.php
  86. +2 −2 lib/Predis/{Commands → Command}/ServerFlushDatabase.php
  87. +2 −2 lib/Predis/{Commands → Command}/ServerInfo.php
  88. +1 −1  lib/Predis/{Commands → Command}/ServerInfoV26x.php
  89. +2 −2 lib/Predis/{Commands → Command}/ServerLastSave.php
  90. +2 −2 lib/Predis/{Commands → Command}/ServerMonitor.php
  91. +2 −2 lib/Predis/{Commands → Command}/ServerObject.php
  92. +2 −2 lib/Predis/{Commands → Command}/ServerSave.php
  93. +2 −2 lib/Predis/{Commands → Command}/ServerScript.php
  94. +2 −2 lib/Predis/{Commands → Command}/ServerShutdown.php
  95. +2 −2 lib/Predis/{Commands → Command}/ServerSlaveOf.php
  96. +3 −3 lib/Predis/{Commands → Command}/ServerSlowlog.php
  97. +1 −1  lib/Predis/{Commands → Command}/SetAdd.php
  98. +1 −1  lib/Predis/{Commands → Command}/SetCardinality.php
  99. +1 −1  lib/Predis/{Commands → Command}/SetDifference.php
  100. +1 −1  lib/Predis/{Commands → Command}/SetDifferenceStore.php
  101. +2 −2 lib/Predis/{Commands → Command}/SetIntersection.php
  102. +2 −2 lib/Predis/{Commands → Command}/SetIntersectionStore.php
  103. +1 −1  lib/Predis/{Commands → Command}/SetIsMember.php
  104. +1 −1  lib/Predis/{Commands → Command}/SetMembers.php
  105. +2 −2 lib/Predis/{Commands → Command}/SetMove.php
  106. +1 −1  lib/Predis/{Commands → Command}/SetPop.php
  107. +1 −1  lib/Predis/{Commands → Command}/SetRandomMember.php
  108. +1 −1  lib/Predis/{Commands → Command}/SetRemove.php
  109. +1 −1  lib/Predis/{Commands → Command}/SetUnion.php
  110. +1 −1  lib/Predis/{Commands → Command}/SetUnionStore.php
  111. +1 −1  lib/Predis/{Commands → Command}/StringAppend.php
  112. +1 −1  lib/Predis/{Commands → Command}/StringDecrement.php
  113. +1 −1  lib/Predis/{Commands → Command}/StringDecrementBy.php
  114. +1 −1  lib/Predis/{Commands → Command}/StringGet.php
  115. +1 −1  lib/Predis/{Commands → Command}/StringGetBit.php
  116. +2 −2 lib/Predis/{Commands → Command}/StringGetMultiple.php
  117. +1 −1  lib/Predis/{Commands → Command}/StringGetRange.php
  118. +1 −1  lib/Predis/{Commands → Command}/StringGetSet.php
  119. +1 −1  lib/Predis/{Commands → Command}/StringIncrement.php
  120. +1 −1  lib/Predis/{Commands → Command}/StringIncrementBy.php
  121. +1 −1  lib/Predis/{Commands → Command}/StringIncrementByFloat.php
  122. +1 −1  lib/Predis/{Commands → Command}/StringPreciseSetExpire.php
  123. +1 −1  lib/Predis/{Commands → Command}/StringSet.php
  124. +1 −1  lib/Predis/{Commands → Command}/StringSetBit.php
  125. +1 −1  lib/Predis/{Commands → Command}/StringSetExpire.php
  126. +2 −2 lib/Predis/{Commands → Command}/StringSetMultiple.php
  127. +1 −1  lib/Predis/{Commands → Command}/StringSetMultiplePreserve.php
  128. +1 −1  lib/Predis/{Commands → Command}/StringSetPreserve.php
  129. +1 −1  lib/Predis/{Commands → Command}/StringSetRange.php
  130. +1 −1  lib/Predis/{Commands → Command}/StringStrlen.php
  131. +1 −1  lib/Predis/{Commands → Command}/StringSubstr.php
  132. +2 −2 lib/Predis/{Commands → Command}/TransactionDiscard.php
  133. +2 −2 lib/Predis/{Commands → Command}/TransactionExec.php
  134. +2 −2 lib/Predis/{Commands → Command}/TransactionMulti.php
  135. +2 −2 lib/Predis/{Commands → Command}/TransactionUnwatch.php
  136. +2 −2 lib/Predis/{Commands → Command}/TransactionWatch.php
  137. +1 −1  lib/Predis/{Commands → Command}/ZSetAdd.php
  138. +1 −1  lib/Predis/{Commands → Command}/ZSetCardinality.php
  139. +1 −1  lib/Predis/{Commands → Command}/ZSetCount.php
  140. +1 −1  lib/Predis/{Commands → Command}/ZSetIncrementBy.php
  141. +1 −1  lib/Predis/{Commands → Command}/ZSetIntersectionStore.php
  142. +2 −2 lib/Predis/{Commands → Command}/ZSetRange.php
  143. +1 −1  lib/Predis/{Commands → Command}/ZSetRangeByScore.php
  144. +1 −1  lib/Predis/{Commands → Command}/ZSetRank.php
  145. +1 −1  lib/Predis/{Commands → Command}/ZSetRemove.php
  146. +1 −1  lib/Predis/{Commands → Command}/ZSetRemoveRangeByRank.php
  147. +1 −1  lib/Predis/{Commands → Command}/ZSetRemoveRangeByScore.php
  148. +1 −1  lib/Predis/{Commands → Command}/ZSetReverseRange.php
  149. +1 −1  lib/Predis/{Commands → Command}/ZSetReverseRangeByScore.php
  150. +1 −1  lib/Predis/{Commands → Command}/ZSetReverseRank.php
  151. +1 −1  lib/Predis/{Commands → Command}/ZSetScore.php
  152. +1 −1  lib/Predis/{Commands → Command}/ZSetUnionStore.php
  153. +4 −4 lib/Predis/CommunicationException.php
  154. +16 −16 lib/Predis/{Network/ConnectionBase.php → Connection/AbstractConnection.php}
  155. +11 −11 lib/Predis/{Network/IConnectionCluster.php → Connection/ClusterConnectionInterface.php}
  156. +5 −5 lib/Predis/{Network/IConnectionComposable.php → Connection/ComposableConnectionInterface.php}
  157. +11 −11 lib/Predis/{Network → Connection}/ComposableStreamConnection.php
  158. +1 −1  lib/Predis/{Network → Connection}/ConnectionException.php
  159. +9 −9 lib/Predis/{Network/IConnection.php → Connection/ConnectionInterface.php}
  160. +15 −15 lib/Predis/{Network → Connection}/MasterSlaveReplication.php
  161. +14 −14 lib/Predis/{Network → Connection}/PhpiredisConnection.php
  162. +14 −14 lib/Predis/{Network → Connection}/PredisCluster.php
  163. +14 −14 lib/Predis/{Network/IConnectionReplication.php → Connection/ReplicationConnectionInterface.php}
  164. +6 −7 lib/Predis/{Network/IConnectionSingle.php → Connection/SingleConnectionInterface.php}
  165. +11 −11 lib/Predis/{Network → Connection}/StreamConnection.php
  166. +19 −18 lib/Predis/{Network → Connection}/WebdisConnection.php
  167. +23 −24 lib/Predis/ConnectionFactory.php
  168. +13 −13 lib/Predis/{IConnectionFactory.php → ConnectionFactoryInterface.php}
  169. +5 −6 lib/Predis/ConnectionParameters.php
  170. +1 −1  lib/Predis/{IConnectionParameters.php → ConnectionParametersInterface.php}
  171. +1 −1  lib/Predis/Distribution/{IDistributionStrategy.php → DistributionStrategyInterface.php}
  172. +2 −2 lib/Predis/Distribution/{INodeKeyGenerator.php → HashGeneratorInterface.php}
  173. +2 −2 lib/Predis/Distribution/HashRing.php
  174. +1 −1  lib/Predis/Distribution/KetamaPureRing.php
  175. +9 −9 lib/Predis/Helpers.php
  176. +1 −1  lib/Predis/{Iterators → Iterator}/MultiBulkResponse.php
  177. +4 −5 lib/Predis/{Iterators → Iterator}/MultiBulkResponseSimple.php
  178. +1 −1  lib/Predis/{Iterators → Iterator}/MultiBulkResponseTuple.php
  179. +5 −1 lib/Predis/{ → Monitor}/MonitorContext.php
  180. +5 −5 lib/Predis/{Options/Option.php → Option/AbstractOption.php}
  181. +14 −14 lib/Predis/{Options → Option}/ClientCluster.php
  182. +8 −8 lib/Predis/{Options → Option}/ClientConnectionFactory.php
  183. +3 −3 lib/Predis/{Options → Option}/ClientOptions.php
  184. +2 −2 lib/Predis/{Options/IClientOptions.php → Option/ClientOptionsInterface.php}
  185. +4 −4 lib/Predis/{Options → Option}/ClientPrefix.php
  186. +7 −7 lib/Predis/{Options → Option}/ClientProfile.php
  187. +15 −15 lib/Predis/{Options → Option}/ClientReplication.php
  188. +5 −5 lib/Predis/{Options → Option}/CustomOption.php
  189. +5 −5 lib/Predis/{Options/IOption.php → Option/OptionInterface.php}
  190. +3 −3 lib/Predis/Pipeline/FireAndForgetExecutor.php
  191. +11 −11 lib/Predis/Pipeline/PipelineContext.php
  192. +4 −4 lib/Predis/Pipeline/{IPipelineExecutor.php → PipelineExecutorInterface.php}
  193. +3 −3 lib/Predis/Pipeline/SafeClusterExecutor.php
  194. +3 −3 lib/Predis/Pipeline/SafeExecutor.php
  195. +3 −3 lib/Predis/Pipeline/StandardExecutor.php
  196. +19 −19 lib/Predis/{Profiles → Profile}/ServerProfile.php
  197. +3 −3 lib/Predis/{Profiles/IServerProfile.php → Profile/ServerProfileInterface.php}
  198. +125 −0 lib/Predis/Profile/ServerVersion12.php
  199. +174 −0 lib/Predis/Profile/ServerVersion20.php
  200. +204 −0 lib/Predis/Profile/ServerVersion22.php
  201. +210 −0 lib/Predis/Profile/ServerVersion24.php
  202. +11 −11 lib/Predis/{Profiles → Profile}/ServerVersionNext.php
  203. +0 −125 lib/Predis/Profiles/ServerVersion12.php
  204. +0 −174 lib/Predis/Profiles/ServerVersion20.php
  205. +0 −204 lib/Predis/Profiles/ServerVersion22.php
  206. +0 −210 lib/Predis/Profiles/ServerVersion24.php
  207. +4 −4 lib/Predis/Protocol/{ICommandSerializer.php → CommandSerializerInterface.php}
  208. +7 −7 lib/Predis/Protocol/{IComposableProtocolProcessor.php → ComposableProtocolInterface.php}
  209. +6 −6 lib/Predis/Protocol/{IProtocolProcessor.php → ProtocolInterface.php}
  210. +4 −4 lib/Predis/Protocol/{IResponseHandler.php → ResponseHandlerInterface.php}
  211. +4 −4 lib/Predis/Protocol/{IResponseReader.php → ResponseReaderInterface.php}
  212. +11 −11 lib/Predis/Protocol/Text/ComposableTextProtocol.php
  213. +5 −5 lib/Predis/Protocol/Text/ResponseBulkHandler.php
  214. +4 −4 lib/Predis/Protocol/Text/ResponseErrorHandler.php
  215. +4 −4 lib/Predis/Protocol/Text/ResponseErrorSilentHandler.php
  216. +5 −5 lib/Predis/Protocol/Text/ResponseIntegerHandler.php
  217. +5 −5 lib/Predis/Protocol/Text/ResponseMultiBulkHandler.php
  218. +6 −6 lib/Predis/Protocol/Text/ResponseMultiBulkStreamHandler.php
  219. +4 −4 lib/Predis/Protocol/Text/ResponseStatusHandler.php
  220. +4 −4 lib/Predis/Protocol/Text/TextCommandSerializer.php
  221. +7 −7 lib/Predis/Protocol/Text/TextProtocol.php
  222. +10 −10 lib/Predis/Protocol/Text/TextResponseReader.php
  223. +1 −1  lib/Predis/ResponseError.php
  224. +1 −1  lib/Predis/{IRedisServerError.php → ResponseErrorInterface.php}
  225. +1 −1  lib/Predis/{IReplyObject.php → ResponseObjectInterface.php}
  226. +1 −1  lib/Predis/ResponseQueued.php
  227. +1 −1  lib/Predis/ServerException.php
  228. +4 −4 lib/Predis/Transaction/MultiExecContext.php
  229. +11 −11 tests/PHPUnit/CommandTestCase.php
  230. +5 −5 tests/PHPUnit/ConnectionTestCase.php
  231. +4 −4 tests/PHPUnit/DistributionStrategyTestCase.php
  232. +4 −4 tests/PHPUnit/ServerVersionTestCase.php
  233. +38 −38 tests/Predis/ClientTest.php
  234. +23 −23 tests/Predis/{Commands → Command}/CommandTest.php
  235. +2 −2 tests/Predis/{Commands → Command}/ConnectionAuthTest.php
  236. +2 −2 tests/Predis/{Commands → Command}/ConnectionEchoTest.php
  237. +2 −2 tests/Predis/{Commands → Command}/ConnectionPingTest.php
  238. +2 −2 tests/Predis/{Commands → Command}/ConnectionQuitTest.php
  239. +2 −2 tests/Predis/{Commands → Command}/ConnectionSelectTest.php
  240. +2 −2 tests/Predis/{Commands → Command}/HashDeleteTest.php
  241. +2 −2 tests/Predis/{Commands → Command}/HashExistsTest.php
  242. +2 −2 tests/Predis/{Commands → Command}/HashGetAllTest.php
  243. +2 −2 tests/Predis/{Commands → Command}/HashGetMultipleTest.php
  244. +2 −2 tests/Predis/{Commands → Command}/HashGetTest.php
  245. +2 −2 tests/Predis/{Commands → Command}/HashIncrementByFloatTest.php
  246. +2 −2 tests/Predis/{Commands → Command}/HashIncrementByTest.php
  247. +2 −2 tests/Predis/{Commands → Command}/HashKeysTest.php
  248. +2 −2 tests/Predis/{Commands → Command}/HashLengthTest.php
  249. +2 −2 tests/Predis/{Commands → Command}/HashSetMultipleTest.php
  250. +2 −2 tests/Predis/{Commands → Command}/HashSetPreserveTest.php
  251. +2 −2 tests/Predis/{Commands → Command}/HashSetTest.php
  252. +2 −2 tests/Predis/{Commands → Command}/HashValuesTest.php
  253. +2 −2 tests/Predis/{Commands → Command}/KeyDeleteTest.php
  254. +2 −2 tests/Predis/{Commands → Command}/KeyExistsTest.php
  255. +2 −2 tests/Predis/{Commands → Command}/KeyExpireAtTest.php
  256. +2 −2 tests/Predis/{Commands → Command}/KeyExpireTest.php
  257. +2 −2 tests/Predis/{Commands → Command}/KeyKeysTest.php
  258. +2 −2 tests/Predis/{Commands → Command}/KeyKeysV12xTest.php
  259. +2 −2 tests/Predis/{Commands → Command}/KeyMoveTest.php
  260. +2 −2 tests/Predis/{Commands → Command}/KeyPersistTest.php
  261. +2 −2 tests/Predis/{Commands → Command}/KeyPreciseExpireAtTest.php
  262. +2 −2 tests/Predis/{Commands → Command}/KeyPreciseExpireTest.php
  263. +2 −2 tests/Predis/{Commands → Command}/KeyPreciseTimeToLiveTest.php
  264. +2 −2 tests/Predis/{Commands → Command}/KeyRandomTest.php
  265. +2 −2 tests/Predis/{Commands → Command}/KeyRenamePreserveTest.php
  266. +2 −2 tests/Predis/{Commands → Command}/KeyRenameTest.php
  267. +2 −2 tests/Predis/{Commands → Command}/KeySortTest.php
  268. +2 −2 tests/Predis/{Commands → Command}/KeyTimeToLiveTest.php
  269. +2 −2 tests/Predis/{Commands → Command}/KeyTypeTest.php
  270. +2 −2 tests/Predis/{Commands → Command}/ListIndexTest.php
  271. +2 −2 tests/Predis/{Commands → Command}/ListInsertTest.php
  272. +2 −2 tests/Predis/{Commands → Command}/ListLengthTest.php
  273. +2 −2 tests/Predis/{Commands → Command}/ListPopFirstBlockingTest.php
  274. +2 −2 tests/Predis/{Commands → Command}/ListPopFirstTest.php
  275. +2 −2 tests/Predis/{Commands → Command}/ListPopLastBlockingTest.php
  276. +2 −2 tests/Predis/{Commands → Command}/ListPopLastPushHeadBlockingTest.php
  277. +2 −2 tests/Predis/{Commands → Command}/ListPopLastPushHeadTest.php
  278. +2 −2 tests/Predis/{Commands → Command}/ListPopLastTest.php
  279. +2 −2 tests/Predis/{Commands → Command}/ListPushHeadTest.php
  280. +2 −2 tests/Predis/{Commands → Command}/ListPushHeadXTest.php
  281. +2 −2 tests/Predis/{Commands → Command}/ListPushTailTest.php
  282. +2 −2 tests/Predis/{Commands → Command}/ListPushTailXTest.php
  283. +2 −2 tests/Predis/{Commands → Command}/ListRangeTest.php
  284. +2 −2 tests/Predis/{Commands → Command}/ListRemoveTest.php
  285. +2 −2 tests/Predis/{Commands → Command}/ListSetTest.php
  286. +2 −2 tests/Predis/{Commands → Command}/ListTrimTest.php
  287. +5 −5 tests/Predis/{Commands → Command}/PrefixHelpersTest.php
  288. +6 −6 tests/Predis/{Commands → Command}/PrefixableCommandTest.php
  289. +4 −4 tests/Predis/{Commands/Processors → Command/Processor}/KeyPrefixProcessorTest.php
  290. +22 −22 tests/Predis/{Commands/Processors → Command/Processor}/ProcessorChainTest.php
  291. +2 −2 tests/Predis/{Commands → Command}/PubSubPublishTest.php
  292. +2 −2 tests/Predis/{Commands → Command}/PubSubSubscribeByPatternTest.php
  293. +2 −2 tests/Predis/{Commands → Command}/PubSubSubscribeTest.php
  294. +2 −2 tests/Predis/{Commands → Command}/PubSubUnsubscribeByPatternTest.php
  295. +2 −2 tests/Predis/{Commands → Command}/PubSubUnsubscribeTest.php
  296. +5 −5 tests/Predis/{Commands → Command}/ScriptedCommandTest.php
  297. +2 −2 tests/Predis/{Commands → Command}/ServerBackgroundRewriteAOFTest.php
  298. +2 −2 tests/Predis/{Commands → Command}/ServerBackgroundSaveTest.php
  299. +2 −2 tests/Predis/{Commands → Command}/ServerClientTest.php
  300. +2 −2 tests/Predis/{Commands → Command}/ServerConfigTest.php
Sorry, we could not display the entire diff because too many files (498) changed.
View
67 CHANGELOG.md
@@ -1,3 +1,70 @@
+v0.8.0 (201x-xx-xx)
+===============================================================================
+
+- Some namespaces have been renamed:
+
+ - `Predis\Network` => `Predis\Connection`
+ - `Predis\Profiles` => `Predis\Profile`
+ - `Predis\Iterators` => `Predis\Iterator`
+ - `Predis\Options` => `Predis\Option`
+ - `Predis\Commands` => `Predis\Command`
+ - `Predis\Commands\Processors` => `Predis\Command\Processor`
+
+- Some interfaces have been renamed:
+
+ - `Predis\IReplyObject` => `Predis\ResponseObjectInterface`
+ - `Predis\IRedisServerError` => `Predis\ResponseErrorInterface`
+ - `Predis\IConnectionFactory` => `Predis\ConnectionFactoryInterface`
+ - `Predis\IConnectionParameters` => `Predis\ConnectionParametersInterface`
+ - `Predis\Options\IOption` => `Predis\Option\OptionInterface`
+ - `Predis\Options\IClientOptions` => `Predis\Option\ClientOptionsInterface`
+ - `Predis\Profile\IServerProfile` => `Predis\Profile\ServerProfileInterface`
+ - `Predis\Pipeline\IPipelineExecutor`
+ => `Predis\Pipeline\PipelineExecutorInterface`
+ - `Predis\Distribution\INodeKeyGenerator`
+ => `Predis\Distribution\HashGeneratorInterface`
+ - `Predis\Distribution\IDistributionStrategy`
+ => `Predis\Distribution\DistributionStrategyInterface`
+ - `Predis\Protocol\IProtocolProcessor` => `Predis\Protocol\ProtocolInterface`
+ - `Predis\Protocol\IResponseReader`
+ => `Predis\Protocol\ResponseReaderInterface`
+ - `Predis\Protocol\IResponseHandler`
+ => `Predis\Protocol\ResponseHandlerInterface`
+ - `Predis\Protocol\ICommandSerializer`
+ => `Predis\Protocol\CommandSerializerInterface`
+ - `Predis\Protocol\IComposableProtocolProcessor`
+ => `Predis\Protocol\ComposableProtocolInterface`
+ - `Predis\Network\IConnection` => `Predis\Connection\ConnectionInterface`
+ - `Predis\Network\IConnectionSingle`
+ => `Predis\Connection\SingleConnectionInterface`
+ - `Predis\Network\IConnectionComposable`
+ => `Predis\Connection\ComposableConnectionInterface`
+ - `Predis\Network\IConnectionCluster`
+ => `Predis\Connection\ClusterConnectionInterface`
+ - `Predis\Network\IConnectionReplication`
+ => `Predis\Connection\ReplicationConnectionInterface`
+ - `Predis\Commands\ICommand` => `Predis\Command\CommandInterface`
+ - `Predis\Commands\IPrefixable`
+ => `Predis\Command\PrefixableCommandInterface`
+ - `Predis\Command\Processor\ICommandProcessor`
+ => `Predis\Command\Processor\CommandProcessorInterface`
+ - `Predis\Command\Processor\ICommandProcessorChain`
+ => `Predis\Command\Processor\CommandProcessorChainInterface`
+ - `Predis\Command\Processor\IProcessingSupport`
+ => `Predis\Command\Processor\CommandProcessingInterface`
+
+- Some classes have been renamed:
+
+ - `Predis\Commands\Command` => `Predis\Command\AbstractCommand`
+ - `Predis\Network\ConnectionBase` => `Predis\Connection\AbstractConnection`
+
+- Some interfaces and classes have been moved to different namespaces:
+
+ - `Predis\MonitorContext` is now under the `Predis\Monitor`.
+
+- `Predis\Options\Option` is now abstract, see `Predis\Option\AbstractOption`.
+
+
v0.7.2 (2012-xx-xx)
===============================================================================
View
2  FAQ.PERFORMANCES.md
@@ -56,7 +56,7 @@ official Redis C client library) with a thin layer that exposes its features to
get the benefits of a faster protocol parser just by adding a single line of code in your application:
$client = new Predis\Client('tcp://127.0.0.1', array(
- 'connections' => array('tcp' => 'Predis\Network\PhpiredisConnection')
+ 'connections' => array('tcp' => 'Predis\Connection\PhpiredisConnection')
));
As simple as it is, nothing will really change in the way you use the library in your application. So,
View
10 README.md
@@ -114,11 +114,11 @@ $replies = $redis->pipeline(function($pipe) {
Predis allows developers to create new connection classes to add support for new protocols or override
the existing ones and provide a different implementation compared to the default classes. This can be
-obtained by subclassing the `Predis\Network\IConnectionSingle` interface.
+obtained by implementing `Predis\Connection\SingleConnectionInterface`.
``` php
<?php
-class MyConnectionClass implements Predis\Network\IConnectionSingle
+class MyConnectionClass implements Predis\Connection\SingleConnectionInterface
{
// implementation goes here
}
@@ -129,8 +129,8 @@ $client = new Predis\Client('tcp://127.0.0.1', array(
));
```
-The classes contained in the `Predis\Network` namespace give you a better insight with actual code on
-how to create new connection classes.
+The classes contained in the `Predis\Connection` namespace give you a better insight with actual code
+on how to create new connection classes.
### Defining and registering new commands on the client at runtime ###
@@ -143,7 +143,7 @@ runtime. Actually, it is easier done than said:
``` php
<?php
-class BrandNewRedisCommand extends Predis\Commands\Command
+class BrandNewRedisCommand extends Predis\Command\AbstractCommand
{
public function getId()
{
View
22 bin/generate-command-test.php
@@ -13,9 +13,9 @@
// -------------------------------------------------------------------------- //
// This script can be used to automatically generate a file with the scheleton
// of a test case to test a Redis command by specifying the name of the class
-// in the Predis\Commands namespace (only classes in this namespace are valid).
+// in the Predis\Command namespace (only classes in this namespace are valid).
// For example, to generate a test case for SET (which is represented by the
-// Predis\Commands\StringSet class):
+// Predis\Command\StringSet class):
//
// $ ./bin/generate-command-test.php --class=StringSet
//
@@ -33,8 +33,8 @@
// is explicitly specified.
// -------------------------------------------------------------------------- //
-use Predis\Commands\ICommand;
-use Predis\Commands\IPrefixable;
+use Predis\Command\CommandInterface;
+use Predis\Command\PrefixableCommandInterface;
class CommandTestCaseGenerator
{
@@ -92,8 +92,8 @@ public static function fromCommandLine()
throw new RuntimeException("Missing 'class' option.");
}
- $options['fqn'] = "Predis\\Commands\\{$options['class']}";
- $options['path'] = "Predis/Commands/{$options['class']}.php";
+ $options['fqn'] = "Predis\\Command\\{$options['class']}";
+ $options['path'] = "Predis/Command/{$options['class']}.php";
$source = __DIR__.'/../lib/'.$options['path'];
if (!file_exists($source)) {
@@ -129,8 +129,8 @@ public function generate()
if (!$reflection->isInstantiable()) {
throw new RuntimeException("Class $class must be instantiable, abstract classes or interfaces are not allowed.");
}
- if (!$reflection->implementsInterface('Predis\Commands\ICommand')) {
- throw new RuntimeException("Class $class must implement the Predis\Commands\ICommand interface.");
+ if (!$reflection->implementsInterface('Predis\Command\CommandInterface')) {
+ throw new RuntimeException("Class $class must implement Predis\Command\CommandInterface.");
}
$instance = $reflection->newInstance();
@@ -148,7 +148,7 @@ public function save()
file_put_contents($options['output'], $this->generate());
}
- protected function getTestCaseBuffer(ICommand $instance)
+ protected function getTestCaseBuffer(CommandInterface $instance)
{
$id = $instance->getId();
$fqn = get_class($instance);
@@ -167,7 +167,7 @@ protected function getTestCaseBuffer(ICommand $instance)
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
use \PHPUnit_Framework_TestCase as StandardTestCase;
@@ -226,7 +226,7 @@ public function testParseResponse()
PHP;
- if ($instance instanceof IPrefixable) {
+ if ($instance instanceof PrefixableCommandInterface) {
$buffer .=<<<PHP
/**
View
10 examples/CustomDistributionStrategy.php
@@ -13,12 +13,12 @@
// Developers can customize the distribution strategy used by the client
// to distribute keys among a cluster of servers simply by creating a class
-// that implements the Predis\Distribution\IDistributionStrategy interface.
+// that implements Predis\Distribution\DistributionStrategyInterface.
-use Predis\Distribution\IDistributionStrategy;
-use Predis\Network\PredisCluster;
+use Predis\Distribution\DistributionStrategyInterface;
+use Predis\Connection\PredisCluster;
-class NaiveDistributionStrategy implements IDistributionStrategy
+class NaiveDistributionStrategy implements DistributionStrategyInterface
{
private $nodes;
private $nodesCount;
@@ -54,7 +54,7 @@ public function get($key)
return $this->nodes[$count > 1 ? abs(crc32($key) % $count) : 0];
}
- public function generateKey($value)
+ public function hash($value)
{
return crc32($value);
}
View
8 examples/MasterSlaveReplicationComplex.php
@@ -13,14 +13,14 @@
// Predis allows to set Lua scripts as read-only operations in the context of
// replication. This works for both EVAL and EVALSHA and also for the client-side
-// abstraction built upon them (Predis\Commands\ScriptedCommand). This example
+// abstraction built upon them (Predis\Command\ScriptedCommand). This example
// shows a slightly more complex configuration that injects a new scripted command
// in the server profile used by the new client instance and marks it marks it as
// a read-only operation for replication so that it will be executed on slaves.
-use Predis\Profiles\ServerProfile;
-use Predis\Commands\ScriptedCommand;
-use Predis\Network\MasterSlaveReplication;
+use Predis\Profile\ServerProfile;
+use Predis\Command\ScriptedCommand;
+use Predis\Connection\MasterSlaveReplication;
// ------------------------------------------------------------------------- //
View
4 examples/ServerSideScripting.php
@@ -14,11 +14,11 @@
// This example will not work with versions of Redis < 2.6.
//
// Additionally to the EVAL command defined in the current development profile, the new
-// Predis\Commands\ScriptedCommand base class can be used to build an higher abstraction
+// Predis\Command\ScriptedCommand base class can be used to build an higher abstraction
// for our "scripted" commands so that they will appear just like any other command on
// the client-side. This is a quick example used to implement INCREX.
-use Predis\Commands\ScriptedCommand;
+use Predis\Command\ScriptedCommand;
class IncrementExistingKey extends ScriptedCommand
{
View
10 examples/SimpleDebuggableConnection.php
@@ -12,8 +12,8 @@
require 'SharedConfigurations.php';
use Predis\ConnectionParameters;
-use Predis\Commands\ICommand;
-use Predis\Network\StreamConnection;
+use Predis\Command\CommandInterface;
+use Predis\Connection\StreamConnection;
class SimpleDebuggableConnection extends StreamConnection
{
@@ -27,7 +27,7 @@ public function connect()
parent::connect();
}
- private function storeDebug(ICommand $command, $direction)
+ private function storeDebug(CommandInterface $command, $direction)
{
$firtsArg = $command->getArgument(0);
$timestamp = round(microtime(true) - $this->tstart, 4);
@@ -40,14 +40,14 @@ private function storeDebug(ICommand $command, $direction)
$this->debugBuffer[] = $debug;
}
- public function writeCommand(ICommand $command)
+ public function writeCommand(CommandInterface $command)
{
parent::writeCommand($command);
$this->storeDebug($command, '->');
}
- public function readResponse(ICommand $command)
+ public function readResponse(CommandInterface $command)
{
$reply = parent::readResponse($command);
$this->storeDebug($command, '<-');
View
46 lib/Predis/Client.php
@@ -11,14 +11,14 @@
namespace Predis;
-use Predis\Commands\ICommand;
-use Predis\Options\IClientOptions;
-use Predis\Network\IConnection;
-use Predis\Network\IConnectionSingle;
-use Predis\Profiles\IServerProfile;
-use Predis\Options\ClientOptions;
-use Predis\Profiles\ServerProfile;
+use Predis\Command\CommandInterface;
+use Predis\Option\ClientOptionsInterface;
+use Predis\Connection\ConnectionInterface;
+use Predis\Profile\ServerProfileInterface;
+use Predis\Option\ClientOptions;
+use Predis\Profile\ServerProfile;
use Predis\PubSub\PubSubContext;
+use Predis\Monitor\MonitorContext;
use Predis\Pipeline\PipelineContext;
use Predis\Transaction\MultiExecContext;
@@ -52,9 +52,9 @@ public function __construct($parameters = null, $options = null)
}
/**
- * Creates an instance of Predis\Options\ClientOptions from various types of
- * arguments (string, array, Predis\Profiles\ServerProfile) or returns the
- * passed object if it is an instance of Predis\Options\ClientOptions.
+ * Creates an instance of Predis\Option\ClientOptions from various types of
+ * arguments (string, array, Predis\Profile\ServerProfile) or returns the
+ * passed object if it is an instance of Predis\Option\ClientOptions.
*
* @param mixed $options Client options.
* @return ClientOptions
@@ -67,10 +67,10 @@ protected function filterOptions($options)
if (is_array($options)) {
return new ClientOptions($options);
}
- if ($options instanceof IClientOptions) {
+ if ($options instanceof ClientOptionsInterface) {
return $options;
}
- if ($options instanceof IServerProfile || is_string($options)) {
+ if ($options instanceof ServerProfileInterface || is_string($options)) {
return new ClientOptions(array('profile' => $options));
}
@@ -80,14 +80,14 @@ protected function filterOptions($options)
/**
* Initializes one or multiple connection (cluster) objects from various
* types of arguments (string, array) or returns the passed object if it
- * implements the Predis\Network\IConnection interface.
+ * implements Predis\Connection\ConnectionInterface.
*
* @param mixed $parameters Connection parameters or instance.
- * @return IConnection
+ * @return ConnectionInterface
*/
protected function initializeConnection($parameters)
{
- if ($parameters instanceof IConnection) {
+ if ($parameters instanceof ConnectionInterface) {
return $parameters;
}
@@ -106,7 +106,7 @@ protected function initializeConnection($parameters)
/**
* Returns the server profile used by the client.
*
- * @return IServerProfile
+ * @return ServerProfileInterface
*/
public function getProfile()
{
@@ -126,7 +126,7 @@ public function getOptions()
/**
* Returns the connection factory object used by the client.
*
- * @return IConnectionFactory
+ * @return ConnectionFactoryInterface
*/
public function getConnectionFactory()
{
@@ -191,7 +191,7 @@ public function isConnected()
* one of the connection instances identified by its alias.
*
* @param string $id The alias of a connection when connected to a cluster.
- * @return IConnection
+ * @return ConnectionInterface
*/
public function getConnection($id = null)
{
@@ -224,7 +224,7 @@ public function __call($method, $arguments)
*
* @param string $method The name of a Redis command.
* @param array $arguments The arguments for the command.
- * @return ICommand
+ * @return CommandInterface
*/
public function createCommand($method, $arguments = array())
{
@@ -234,10 +234,10 @@ public function createCommand($method, $arguments = array())
/**
* Executes the specified Redis command.
*
- * @param ICommand $command A Redis command.
+ * @param CommandInterface $command A Redis command.
* @return mixed
*/
- public function executeCommand(ICommand $command)
+ public function executeCommand(CommandInterface $command)
{
return $this->connection->executeCommand($command);
}
@@ -245,10 +245,10 @@ public function executeCommand(ICommand $command)
/**
* Executes the specified Redis command on all the nodes of a cluster.
*
- * @param ICommand $command A Redis command.
+ * @param CommandInterface $command A Redis command.
* @return array
*/
- public function executeCommandOnShards(ICommand $command)
+ public function executeCommandOnShards(CommandInterface $command)
{
if (Helpers::isCluster($this->connection)) {
$replies = array();
View
10 lib/Predis/Commands/Command.php → lib/Predis/Command/AbstractCommand.php
@@ -9,17 +9,17 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
use Predis\Helpers;
-use Predis\Distribution\INodeKeyGenerator;
+use Predis\Distribution\HashGeneratorInterface;
/**
* Base class for Redis commands.
*
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-abstract class Command implements ICommand
+abstract class AbstractCommand implements CommandInterface
{
private $hash;
private $arguments = array();
@@ -113,7 +113,7 @@ protected function checkSameHashForKeys(Array $keys)
/**
* {@inheritdoc}
*/
- public function getHash(INodeKeyGenerator $distributor)
+ public function getHash(HashGeneratorInterface $hasher)
{
if (isset($this->hash)) {
return $this->hash;
@@ -121,7 +121,7 @@ public function getHash(INodeKeyGenerator $distributor)
if ($this->canBeHashed()) {
$key = Helpers::extractKeyTag($this->arguments[0]);
- $this->hash = $distributor->generateKey($key);
+ $this->hash = $hasher->hash($key);
return $this->hash;
}
View
10 lib/Predis/Commands/ICommand.php → lib/Predis/Command/CommandInterface.php
@@ -9,15 +9,15 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
-use Predis\Distribution\INodeKeyGenerator;
+use Predis\Distribution\HashGeneratorInterface;
/**
* Defines an abstraction representing a Redis command.
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-interface ICommand
+interface CommandInterface
{
/**
* Gets the ID of a Redis command.
@@ -30,10 +30,10 @@ public function getId();
* Returns an hash of the command using the provided algorithm against the
* key (used to calculate the distribution of keys with client-side sharding).
*
- * @param INodeKeyGenerator $distributor Distribution algorithm.
+ * @param HashGeneratorInterface $hasher Distribution algorithm.
* @return int
*/
- public function getHash(INodeKeyGenerator $distributor);
+ public function getHash(HashGeneratorInterface $hasher);
/**
* Sets the arguments of the command.
View
4 lib/Predis/Commands/ConnectionAuth.php → lib/Predis/Command/ConnectionAuth.php
@@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/auth
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-class ConnectionAuth extends Command
+class ConnectionAuth extends AbstractCommand
{
/**
* {@inheritdoc}
View
4 lib/Predis/Commands/ConnectionEcho.php → lib/Predis/Command/ConnectionEcho.php
@@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/echo
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-class ConnectionEcho extends Command
+class ConnectionEcho extends AbstractCommand
{
/**
* {@inheritdoc}
View
4 lib/Predis/Commands/ConnectionPing.php → lib/Predis/Command/ConnectionPing.php
@@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/ping
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-class ConnectionPing extends Command
+class ConnectionPing extends AbstractCommand
{
/**
* {@inheritdoc}
View
4 lib/Predis/Commands/ConnectionQuit.php → lib/Predis/Command/ConnectionQuit.php
@@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/quit
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-class ConnectionQuit extends Command
+class ConnectionQuit extends AbstractCommand
{
/**
* {@inheritdoc}
View
4 lib/Predis/Commands/ConnectionSelect.php → lib/Predis/Command/ConnectionSelect.php
@@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/select
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-class ConnectionSelect extends Command
+class ConnectionSelect extends AbstractCommand
{
/**
* {@inheritdoc}
View
2  lib/Predis/Commands/HashDelete.php → lib/Predis/Command/HashDelete.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
use Predis\Helpers;
View
2  lib/Predis/Commands/HashExists.php → lib/Predis/Command/HashExists.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/hexists
View
2  lib/Predis/Commands/HashGet.php → lib/Predis/Command/HashGet.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/hget
View
4 lib/Predis/Commands/HashGetAll.php → lib/Predis/Command/HashGetAll.php
@@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
-use Predis\Iterators\MultiBulkResponseTuple;
+use Predis\Iterator\MultiBulkResponseTuple;
/**
* @link http://redis.io/commands/hgetall
View
2  lib/Predis/Commands/HashGetMultiple.php → lib/Predis/Command/HashGetMultiple.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
use Predis\Helpers;
View
2  lib/Predis/Commands/HashIncrementBy.php → lib/Predis/Command/HashIncrementBy.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/hincrby
View
2  lib/Predis/Commands/HashIncrementByFloat.php → lib/Predis/Command/HashIncrementByFloat.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/hincrbyfloat
View
2  lib/Predis/Commands/HashKeys.php → lib/Predis/Command/HashKeys.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/hkeys
View
2  lib/Predis/Commands/HashLength.php → lib/Predis/Command/HashLength.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/hlen
View
2  lib/Predis/Commands/HashSet.php → lib/Predis/Command/HashSet.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/hset
View
2  lib/Predis/Commands/HashSetMultiple.php → lib/Predis/Command/HashSetMultiple.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/hmset
View
2  lib/Predis/Commands/HashSetPreserve.php → lib/Predis/Command/HashSetPreserve.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/hsetnx
View
2  lib/Predis/Commands/HashValues.php → lib/Predis/Command/HashValues.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/hvals
View
4 lib/Predis/Commands/KeyDelete.php → lib/Predis/Command/KeyDelete.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
use Predis\Helpers;
@@ -17,7 +17,7 @@
* @link http://redis.io/commands/del
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-class KeyDelete extends Command implements IPrefixable
+class KeyDelete extends AbstractCommand implements PrefixableCommandInterface
{
/**
* {@inheritdoc}
View
2  lib/Predis/Commands/KeyExists.php → lib/Predis/Command/KeyExists.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/exists
View
2  lib/Predis/Commands/KeyExpire.php → lib/Predis/Command/KeyExpire.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/expire
View
2  lib/Predis/Commands/KeyExpireAt.php → lib/Predis/Command/KeyExpireAt.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/expireat
View
2  lib/Predis/Commands/KeyKeys.php → lib/Predis/Command/KeyKeys.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/keys
View
2  lib/Predis/Commands/KeyKeysV12x.php → lib/Predis/Command/KeyKeysV12x.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/keys
View
2  lib/Predis/Commands/KeyMove.php → lib/Predis/Command/KeyMove.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/move
View
2  lib/Predis/Commands/KeyPersist.php → lib/Predis/Command/KeyPersist.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/persist
View
2  lib/Predis/Commands/KeyPreciseExpire.php → lib/Predis/Command/KeyPreciseExpire.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/pexpire
View
2  lib/Predis/Commands/KeyPreciseExpireAt.php → lib/Predis/Command/KeyPreciseExpireAt.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/pexpireat
View
2  lib/Predis/Commands/KeyPreciseTimeToLive.php → lib/Predis/Command/KeyPreciseTimeToLive.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/pttl
View
4 lib/Predis/Commands/KeyRandom.php → lib/Predis/Command/KeyRandom.php
@@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/randomkey
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-class KeyRandom extends Command
+class KeyRandom extends AbstractCommand
{
/**
* {@inheritdoc}
View
4 lib/Predis/Commands/KeyRename.php → lib/Predis/Command/KeyRename.php
@@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/rename
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-class KeyRename extends Command implements IPrefixable
+class KeyRename extends AbstractCommand implements PrefixableCommandInterface
{
/**
* {@inheritdoc}
View
2  lib/Predis/Commands/KeyRenamePreserve.php → lib/Predis/Command/KeyRenamePreserve.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/renamenx
View
4 lib/Predis/Commands/KeySort.php → lib/Predis/Command/KeySort.php
@@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/sort
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-class KeySort extends Command implements IPrefixable
+class KeySort extends AbstractCommand implements PrefixableCommandInterface
{
/**
* {@inheritdoc}
View
2  lib/Predis/Commands/KeyTimeToLive.php → lib/Predis/Command/KeyTimeToLive.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/ttl
View
2  lib/Predis/Commands/KeyType.php → lib/Predis/Command/KeyType.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/type
View
2  lib/Predis/Commands/ListIndex.php → lib/Predis/Command/ListIndex.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/lindex
View
2  lib/Predis/Commands/ListInsert.php → lib/Predis/Command/ListInsert.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/linsert
View
2  lib/Predis/Commands/ListLength.php → lib/Predis/Command/ListLength.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/llen
View
2  lib/Predis/Commands/ListPopFirst.php → lib/Predis/Command/ListPopFirst.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/lpop
View
4 lib/Predis/Commands/ListPopFirstBlocking.php → lib/Predis/Command/ListPopFirstBlocking.php
@@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/blpop
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-class ListPopFirstBlocking extends Command implements IPrefixable
+class ListPopFirstBlocking extends AbstractCommand implements PrefixableCommandInterface
{
/**
* {@inheritdoc}
View
2  lib/Predis/Commands/ListPopLast.php → lib/Predis/Command/ListPopLast.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/rpop
View
2  lib/Predis/Commands/ListPopLastBlocking.php → lib/Predis/Command/ListPopLastBlocking.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/brpop
View
4 lib/Predis/Commands/ListPopLastPushHead.php → lib/Predis/Command/ListPopLastPushHead.php
@@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/rpoplpush
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-class ListPopLastPushHead extends Command implements IPrefixable
+class ListPopLastPushHead extends AbstractCommand implements PrefixableCommandInterface
{
/**
* {@inheritdoc}
View
4 lib/Predis/Commands/ListPopLastPushHeadBlocking.php → lib/Predis/Command/ListPopLastPushHeadBlocking.php
@@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/brpoplpush
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-class ListPopLastPushHeadBlocking extends Command implements IPrefixable
+class ListPopLastPushHeadBlocking extends AbstractCommand implements PrefixableCommandInterface
{
/**
* {@inheritdoc}
View
2  lib/Predis/Commands/ListPushHead.php → lib/Predis/Command/ListPushHead.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/lpush
View
2  lib/Predis/Commands/ListPushHeadX.php → lib/Predis/Command/ListPushHeadX.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/lpushx
View
2  lib/Predis/Commands/ListPushTail.php → lib/Predis/Command/ListPushTail.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
use Predis\Helpers;
View
2  lib/Predis/Commands/ListPushTailX.php → lib/Predis/Command/ListPushTailX.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/rpushx
View
2  lib/Predis/Commands/ListRange.php → lib/Predis/Command/ListRange.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/lrange
View
2  lib/Predis/Commands/ListRemove.php → lib/Predis/Command/ListRemove.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/lrem
View
2  lib/Predis/Commands/ListSet.php → lib/Predis/Command/ListSet.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/lset
View
2  lib/Predis/Commands/ListTrim.php → lib/Predis/Command/ListTrim.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* @link http://redis.io/commands/ltrim
View
18 lib/Predis/Commands/PrefixHelpers.php → lib/Predis/Command/PrefixHelpers.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* Class that defines a few helpers method for prefixing keys.
@@ -21,10 +21,10 @@ class PrefixHelpers
/**
* Applies the specified prefix only the first argument.
*
- * @param ICommand $command Command instance.
+ * @param CommandInterface $command Command instance.
* @param string $prefix Prefix string.
*/
- public static function first(ICommand $command, $prefix)
+ public static function first(CommandInterface $command, $prefix)
{
if ($arguments = $command->getArguments()) {
$arguments[0] = "$prefix{$arguments[0]}";
@@ -35,10 +35,10 @@ public static function first(ICommand $command, $prefix)
/**
* Applies the specified prefix to all the arguments.
*
- * @param ICommand $command Command instance.
+ * @param CommandInterface $command Command instance.
* @param string $prefix Prefix string.
*/
- public static function all(ICommand $command, $prefix)
+ public static function all(CommandInterface $command, $prefix)
{
$arguments = $command->getArguments();
@@ -52,10 +52,10 @@ public static function all(ICommand $command, $prefix)
/**
* Applies the specified prefix only to even arguments in the list.
*
- * @param ICommand $command Command instance.
+ * @param CommandInterface $command Command instance.
* @param string $prefix Prefix string.
*/
- public static function interleaved(ICommand $command, $prefix)
+ public static function interleaved(CommandInterface $command, $prefix)
{
$arguments = $command->getArguments();
$length = count($arguments);
@@ -70,10 +70,10 @@ public static function interleaved(ICommand $command, $prefix)
/**
* Applies the specified prefix to all the arguments but the last one.
*
- * @param ICommand $command Command instance.
+ * @param CommandInterface $command Command instance.
* @param string $prefix Prefix string.
*/
- public static function skipLast(ICommand $command, $prefix)
+ public static function skipLast(CommandInterface $command, $prefix)
{
$arguments = $command->getArguments();
$length = count($arguments);
View
4 lib/Predis/Commands/PrefixableCommand.php → lib/Predis/Command/PrefixableCommand.php
@@ -9,14 +9,14 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
+namespace Predis\Command;
/**
* Base class for Redis commands with prefixable keys.
*
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-abstract class PrefixableCommand extends Command implements IPrefixable
+abstract class PrefixableCommand extends AbstractCommand implements PrefixableCommandInterface
{
/**
* {@inheritdoc}
View
6 lib/Predis/Commands/IPrefixable.php → lib/Predis/Command/PrefixableCommandInterface.php
@@ -9,16 +9,14 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands;
-
-use Predis\Distribution\INodeKeyGenerator;
+namespace Predis\Command;
/**
* Defines a command whose keys can be prefixed.
*
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-interface IPrefixable
+interface PrefixableCommandInterface
{
/**
* Prefixes all the keys found in the arguments of the command.
View
10 ...Predis/Commands/Processors/IProcessingSupport.php → .../Command/Processor/CommandProcessingInterface.php
@@ -9,26 +9,26 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands\Processors;
+namespace Predis\Command\Processor;
/**
* Defines an object that can process commands using command processors.
*
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-interface IProcessingSupport
+interface CommandProcessingInterface
{
/**
* Associates a command processor.
*
- * @param ICommandProcessor $processor The command processor.
+ * @param CommandProcessorInterface $processor The command processor.
*/
- public function setProcessor(ICommandProcessor $processor);
+ public function setProcessor(CommandProcessorInterface $processor);
/**
* Returns the associated command processor.
*
- * @return ICommandProcessor
+ * @return CommandProcessorInterface
*/
public function getProcessor();
}
View
12 ...is/Commands/Processors/ICommandProcessorChain.php → ...mand/Processor/CommandProcessorChainInterface.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands\Processors;
+namespace Predis\Command\Processor;
/**
* A command processor chain processes a command using multiple chained command
@@ -17,21 +17,21 @@
*
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-interface ICommandProcessorChain extends ICommandProcessor, \IteratorAggregate, \Countable
+interface CommandProcessorChainInterface extends CommandProcessorInterface, \IteratorAggregate, \Countable
{
/**
* Adds a command processor.
*
- * @param ICommandProcessor $processor A command processor.
+ * @param CommandProcessorInterface $processor A command processor.
*/
- public function add(ICommandProcessor $processor);
+ public function add(CommandProcessorInterface $processor);
/**
* Removes a command processor from the chain.
*
- * @param ICommandProcessor $processor A command processor.
+ * @param CommandProcessorInterface $processor A command processor.
*/
- public function remove(ICommandProcessor $processor);
+ public function remove(CommandProcessorInterface $processor);
/**
* Returns an ordered list of the command processors in the chain.
View
10 lib/Predis/Commands/Processors/ICommandProcessor.php → ...s/Command/Processor/CommandProcessorInterface.php
@@ -9,21 +9,21 @@
* file that was distributed with this source code.
*/
-namespace Predis\Commands\Processors;
+namespace Predis\Command\Processor;
-use Predis\Commands\ICommand;
+use Predis\Command\CommandInterface;
/**
* A command processor processes commands before they are sent to Redis.
*
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
-interface ICommandProcessor
+interface CommandProcessorInterface
{