소스 검색

Enhancement: allows method chaining with commands pipelines.

Daniele Alessandri 15 년 전
부모
커밋
47d34531e3
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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) {