Эх сурвалжийг харах

Rename protocol interfaces.

Daniele Alessandri 14 жил өмнө
parent
commit
6abac4590d

+ 3 - 3
lib/Predis/Network/ComposableStreamConnection.php

@@ -5,18 +5,18 @@ namespace Predis\Network;
 use Predis\ICommand;
 use Predis\ConnectionParameters;
 use Predis\CommunicationException;
-use Predis\Protocols\IRedisProtocol;
+use Predis\Protocols\IProtocolProcessor;
 use Predis\Protocols\TextProtocol;
 
 class ComposableStreamConnection extends StreamConnection implements IConnectionComposable {
     private $_protocol;
 
-    public function __construct(ConnectionParameters $parameters, IRedisProtocol $protocol = null) {
+    public function __construct(ConnectionParameters $parameters, IProtocolProcessor $protocol = null) {
         parent::__construct($parameters);
         $this->_protocol = $protocol ?: new TextProtocol();
     }
 
-    public function setProtocol(IRedisProtocol $protocol) {
+    public function setProtocol(IProtocolProcessor $protocol) {
         if ($protocol === null) {
             throw new \InvalidArgumentException("The protocol instance cannot be a null value");
         }

+ 2 - 2
lib/Predis/Network/IConnectionComposable.php

@@ -2,10 +2,10 @@
 
 namespace Predis\Network;
 
-use Predis\Protocols\IRedisProtocol;
+use Predis\Protocols\IProtocolProcessor;
 
 interface IConnectionComposable extends IConnectionSingle {
-    public function setProtocol(IRedisProtocol $protocol);
+    public function setProtocol(IProtocolProcessor $protocol);
     public function getProtocol();
     public function writeBytes($buffer);
     public function readBytes($length);

+ 1 - 1
lib/Predis/Protocols/ComposableTextProtocol.php

@@ -5,7 +5,7 @@ namespace Predis\Protocols;
 use Predis\ICommand;
 use Predis\Network\IConnectionComposable;
 
-class ComposableTextProtocol implements IRedisProtocolExtended {
+class ComposableTextProtocol implements IProtocolProcessorExtended {
     private $_serializer, $_reader;
 
     public function __construct(Array $options = array()) {

+ 1 - 1
lib/Predis/Protocols/IRedisProtocol.php → lib/Predis/Protocols/IProtocolProcessor.php

@@ -5,7 +5,7 @@ namespace Predis\Protocols;
 use Predis\ICommand;
 use Predis\Network\IConnectionComposable;
 
-interface IRedisProtocol {
+interface IProtocolProcessor {
     public function write(IConnectionComposable $connection, ICommand $command);
     public function read(IConnectionComposable $connection);
     public function setOption($option, $value);

+ 1 - 1
lib/Predis/Protocols/IRedisProtocolExtended.php → lib/Predis/Protocols/IProtocolProcessorExtended.php

@@ -4,7 +4,7 @@ namespace Predis\Protocols;
 
 use Predis\ICommand;
 
-interface IRedisProtocolExtended extends IRedisProtocol {
+interface IProtocolProcessorExtended extends IProtocolProcessor {
     public function setSerializer(ICommandSerializer $serializer);
     public function getSerializer();
     public function setReader(IResponseReader $reader);

+ 1 - 1
lib/Predis/Protocols/TextProtocol.php

@@ -10,7 +10,7 @@ use Predis\CommunicationException;
 use Predis\Network\IConnectionComposable;
 use Predis\Iterators\MultiBulkResponseSimple;
 
-class TextProtocol implements IRedisProtocol {
+class TextProtocol implements IProtocolProcessor {
     const NEWLINE = "\r\n";
     const OK      = 'OK';
     const ERROR   = 'ERR';