소스 검색

Made ConnectionCluster::getConnection public, so client code can check to which server a command would be sent.

Daniele Alessandri 15 년 전
부모
커밋
4f3ffe1217
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/Predis.php

+ 1 - 1
lib/Predis.php

@@ -906,7 +906,7 @@ class ConnectionCluster implements IConnection, \IteratorAggregate {
         $this->_ring->add($connection);
     }
 
-    private function getConnection(Command $command) {
+    public function getConnection(Command $command) {
         if ($command->canBeHashed() === false) {
             throw new ClientException(
                 sprintf("Cannot send '%s' commands to a cluster of connections.", $command->getCommandId())