Browse Source

Add required methods to Predis\IConnectionSingle and Predis\IConnectionCluster interfaces.

Daniele Alessandri 15 năm trước cách đây
mục cha
commit
e191d0a7ce
1 tập tin đã thay đổi với 9 bổ sung2 xóa
  1. 9 2
      lib/Predis.php

+ 9 - 2
lib/Predis.php

@@ -1086,9 +1086,16 @@ interface IConnection {
     public function executeCommand(Command $command);
 }
 
-interface IConnectionSingle extends IConnection { }
+interface IConnectionSingle extends IConnection {
+    public function writeBytes($buffer);
+    public function readBytes($length);
+    public function readLine();
+}
 
-interface IConnectionCluster extends IConnection { }
+interface IConnectionCluster extends IConnection {
+    public function getConnection(Command $command);
+    public function getConnectionById($connectionId);
+}
 
 class TcpConnection implements IConnectionSingle {
     private $_params, $_socket, $_initCmds, $_reader;