Browse Source

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

Daniele Alessandri 14 years ago
parent
commit
fee3866f54
1 changed files with 4 additions and 0 deletions
  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();