Explorar el Código

Enhancement: allows method chaining with commands pipelines.

Daniele Alessandri hace 15 años
padre
commit
47d34531e3
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      lib/Predis.php

+ 3 - 0
lib/Predis.php

@@ -412,6 +412,7 @@ class CommandPipeline {
     public function __call($method, $arguments) {
         $command = $this->_redisClient->createCommand($method, $arguments);
         $this->recordCommand($command);
+        return $this;
     }
 
     private function recordCommand(Command $command) {
@@ -438,6 +439,8 @@ class CommandPipeline {
             $this->_returnValues[] = $connection->readResponse($commands[$i]);
             unset($commands[$i]);
         }
+
+        return $this;
     }
 
     private function setRunning($bool) {