From fee3866f54dc52ca7be4a57bfaa79959ab53a9d5 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Thu, 2 Jun 2011 16:53:16 +0200 Subject: [PATCH] Make it possible to pipeline instances of Predis\Command\ICommand directly. --- lib/Predis/Pipeline/PipelineContext.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Predis/Pipeline/PipelineContext.php b/lib/Predis/Pipeline/PipelineContext.php index db34fbc2..63c0fbfb 100644 --- a/lib/Predis/Pipeline/PipelineContext.php +++ b/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();