diff options
Diffstat (limited to 'vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/BodyVisitor.php')
-rw-r--r-- | vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/BodyVisitor.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/BodyVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/BodyVisitor.php new file mode 100644 index 0000000..f70b727 --- /dev/null +++ b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/BodyVisitor.php @@ -0,0 +1,23 @@ +<?php + +namespace Guzzle\Service\Command\LocationVisitor\Response; + +use Guzzle\Service\Command\CommandInterface; +use Guzzle\Http\Message\Response; +use Guzzle\Service\Description\Parameter; + +/** + * Visitor used to add the body of a response to a particular key + */ +class BodyVisitor extends AbstractResponseVisitor +{ + public function visit( + CommandInterface $command, + Response $response, + Parameter $param, + &$value, + $context = null + ) { + $value[$param->getName()] = $param->filter($response->getBody()); + } +} |