Ver Fonte

Get ResponseReader options values.

Daniele Alessandri há 15 anos atrás
pai
commit
3b150d4d86
1 ficheiros alterados com 6 adições e 0 exclusões
  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");
         }