소스 검색

Enhanchement: added the ability to set options on a ResponseReader instance.

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

+ 14 - 0
lib/Predis.php

@@ -389,6 +389,20 @@ class ResponseReader {
         $this->_prefixHandlers[$prefix] = $handler;
     }
 
+    public function setOption($option, $value) {
+        switch ($option) {
+            default:
+                throw new \InvalidArgumentException("Unknown option: $option");
+        }
+    }
+
+    public function getOption($option) {
+        switch ($option) {
+            default:
+                throw new \InvalidArgumentException("Unknown option: $option");
+        }
+    }
+
     public function read($socket) {
         $header  = fgets($socket);
         if ($header === false) {