Explorar o código

Get ResponseReader options values.

Daniele Alessandri %!s(int64=15) %!d(string=hai) anos
pai
achega
3b150d4d86
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      lib/Predis.php

+ 6 - 0
lib/Predis.php

@@ -427,6 +427,12 @@ class ResponseReader {
 
     public function getOption($option) {
         switch ($option) {
+            case 'iterable_multibulk_replies':
+            case 'iterableMultiBulkReplies':
+                return $this->_prefixHandlers['*'] instanceof ResponseMultiBulkStreamHandler;
+            case 'errorThrowException':
+            case 'error_throw_exception':
+                return $this->_prefixHandlers['*'] instanceof ResponseErrorHandler;
             default:
                 throw new \InvalidArgumentException("Unknown option: $option");
         }