浏览代码

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

Daniele Alessandri 15 年之前
父节点
当前提交
e191d0a7ce
共有 1 个文件被更改,包括 9 次插入2 次删除
  1. 9 2
      lib/Predis.php

+ 9 - 2
lib/Predis.php

@@ -1086,9 +1086,16 @@ interface IConnection {
     public function executeCommand(Command $command);
     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 {
 class TcpConnection implements IConnectionSingle {
     private $_params, $_socket, $_initCmds, $_reader;
     private $_params, $_socket, $_initCmds, $_reader;