Browse Source

Make it possible to pipeline instances of Predis\Command\ICommand directly.

Daniele Alessandri 14 năm trước cách đây
mục cha
commit
fee3866f54
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      lib/Predis/Pipeline/PipelineContext.php

+ 4 - 0
lib/Predis/Pipeline/PipelineContext.php

@@ -47,6 +47,10 @@ class PipelineContext {
         $this->_pipeline[] = $command;
     }
 
+    public function executeCommand(ICommand $command) {
+        $this->recordCommand($command);
+    }
+
     public function flushPipeline() {
         if (count($this->_pipeline) > 0) {
             $connection = $this->_client->getConnection();