Browse Source

Fixed method and class name

Artur Kotyrba 14 years ago
parent
commit
650d6a07e0

+ 2 - 1
lib/Predis/Network/ConnectionCluster.php

@@ -6,13 +6,14 @@ use Predis\Helpers;
 use Predis\ClientException;
 use Predis\Commands\ICommand;
 use Predis\Distribution\IDistributionStrategy;
+use Predis\Distribution\HashRing;
 
 class ConnectionCluster implements IConnectionCluster, \IteratorAggregate {
     private $_pool, $_distributor;
 
     public function __construct(IDistributionStrategy $distributor = null) {
         $this->_pool = array();
-        $this->_distributor = $distributor ?: new Distribution\HashRing();
+        $this->_distributor = $distributor ?: new HashRing();
     }
 
     public function isConnected() {

+ 1 - 1
lib/Predis/Protocols/Text/TextResponseReader.php

@@ -43,7 +43,7 @@ class TextResponseReader implements IResponseReader {
 
         $prefix = $header[0];
         if (!isset($this->_prefixHandlers[$prefix])) {
-            $this->throwMalformedResponse($connection, "Unknown prefix '$prefix'");
+            $this->protocolError($connection, "Unknown prefix '$prefix'");
         }
         $handler = $this->_prefixHandlers[$prefix];
         return $handler->handle($connection, substr($header, 1));