From 82c1b2ac579bd14ed96ffcf6596c4af723fca6a7 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Thu, 24 May 2012 13:08:33 -0700 Subject: [PATCH] [Service] Allowing the result of a command to be changed. pt 2. --- src/Guzzle/Service/Command/AbstractCommand.php | 14 ++++++++++++++ src/Guzzle/Service/Command/CommandInterface.php | 9 +++++++++ 2 files changed, 23 insertions(+) diff --git a/src/Guzzle/Service/Command/AbstractCommand.php b/src/Guzzle/Service/Command/AbstractCommand.php index 11eec210..74a797a6 100644 --- a/src/Guzzle/Service/Command/AbstractCommand.php +++ b/src/Guzzle/Service/Command/AbstractCommand.php @@ -275,6 +275,20 @@ abstract class AbstractCommand extends Collection implements CommandInterface return $this->result; } + /** + * Set the result of the command + * + * @param mixed $result Result to set + * + * @return self + */ + public function setResult($result) + { + $this->result = $result; + + return $this; + } + /** * Returns TRUE if the command has been prepared for executing * diff --git a/src/Guzzle/Service/Command/CommandInterface.php b/src/Guzzle/Service/Command/CommandInterface.php index 5ec47909..f0ff973d 100644 --- a/src/Guzzle/Service/Command/CommandInterface.php +++ b/src/Guzzle/Service/Command/CommandInterface.php @@ -100,6 +100,15 @@ interface CommandInterface */ function getResult(); + /** + * Set the result of the command + * + * @param mixed $result Result to set + * + * @return self + */ + function setResult($result); + /** * Returns TRUE if the command has been prepared for executing *