1: <?php
2:
3: namespace Guzzle\Service\Command\LocationVisitor\Response;
4:
5: use Guzzle\Http\Message\Response;
6: use Guzzle\Service\Description\Parameter;
7: use Guzzle\Service\Command\CommandInterface;
8:
9: /**
10: * Location visitor used to parse values out of a response into an associative array
11: */
12: interface ResponseVisitorInterface
13: {
14: /**
15: * Called before visiting all parameters. This can be used for seeding the result of a command with default
16: * data (e.g. populating with JSON data in the response then adding to the parsed data).
17: *
18: * @param CommandInterface $command Command being visited
19: * @param array $result Result value to update if needed (e.g. parsing XML or JSON into an array)
20: */
21: public function before(CommandInterface $command, array &$result);
22:
23: /**
24: * Called after visiting all parameters
25: *
26: * @param CommandInterface $command Command being visited
27: */
28: public function after(CommandInterface $command);
29:
30: /**
31: * Called once for each parameter being visited that matches the location type
32: *
33: * @param CommandInterface $command Command being visited
34: * @param Response $response Response being visited
35: * @param Parameter $param Parameter being visited
36: * @param mixed $value Result associative array value being updated by reference
37: * @param mixed $context Parsing context
38: */
39: public function visit(CommandInterface $command, Response $response, Parameter $param, &$value, $context = null);
40: }
41: