diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2019-11-17 20:45:02 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2019-11-17 20:45:02 +0100 |
commit | 8df3db566a3a937b45ebf11adb90d265e6f5e2d4 (patch) | |
tree | 4d541098d751d5a9acf8c12f6fb9f308ace066ac /vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ResponseVisitorInterface.php | |
download | flyspray-8df3db566a3a937b45ebf11adb90d265e6f5e2d4.tar.xz |
initial checking of customized version 1.0rc9
Diffstat (limited to 'vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ResponseVisitorInterface.php')
-rw-r--r-- | vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ResponseVisitorInterface.php | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ResponseVisitorInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ResponseVisitorInterface.php new file mode 100644 index 0000000..033f40c --- /dev/null +++ b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ResponseVisitorInterface.php @@ -0,0 +1,46 @@ +<?php + +namespace Guzzle\Service\Command\LocationVisitor\Response; + +use Guzzle\Http\Message\Response; +use Guzzle\Service\Description\Parameter; +use Guzzle\Service\Command\CommandInterface; + +/** + * Location visitor used to parse values out of a response into an associative array + */ +interface ResponseVisitorInterface +{ + /** + * Called before visiting all parameters. This can be used for seeding the result of a command with default + * data (e.g. populating with JSON data in the response then adding to the parsed data). + * + * @param CommandInterface $command Command being visited + * @param array $result Result value to update if needed (e.g. parsing XML or JSON) + */ + public function before(CommandInterface $command, array &$result); + + /** + * Called after visiting all parameters + * + * @param CommandInterface $command Command being visited + */ + public function after(CommandInterface $command); + + /** + * Called once for each parameter being visited that matches the location type + * + * @param CommandInterface $command Command being visited + * @param Response $response Response being visited + * @param Parameter $param Parameter being visited + * @param mixed $value Result associative array value being updated by reference + * @param mixed $context Parsing context + */ + public function visit( + CommandInterface $command, + Response $response, + Parameter $param, + &$value, + $context = null + ); +} |