$responseLocations
$responseLocations : \GuzzleHttp\Command\Guzzle\ResponseLocation\ResponseLocationInterface[]
Handler used to create response models based on an HTTP response and a service description.
Response location visitors are registered with this Handler to handle
locations (e.g., 'xml', 'json', 'header'). All of the locations of a response
model that will be visited first have their before
method triggered.
After the before method is called on every visitor that will be walked, each
visitor is triggered using the visit()
method. After all of the visitors
are visited, the after()
method is called on each visitor. This is the
place in which you should handle things like additionalProperties with
custom locations (i.e., this is how it is handled in the JSON visitor).
$responseLocations : \GuzzleHttp\Command\Guzzle\ResponseLocation\ResponseLocationInterface[]
$description : \GuzzleHttp\Command\Guzzle\DescriptionInterface
$process : bool
__construct(\GuzzleHttp\Command\Guzzle\DescriptionInterface $description, bool $process, \GuzzleHttp\Command\Guzzle\ResponseLocation\ResponseLocationInterface[] $responseLocations = []) : mixed
\GuzzleHttp\Command\Guzzle\DescriptionInterface | $description | |
bool | $process | |
\GuzzleHttp\Command\Guzzle\ResponseLocation\ResponseLocationInterface[] | $responseLocations | Extra response locations |
__invoke(\Psr\Http\Message\ResponseInterface $response, \Psr\Http\Message\RequestInterface|null $request, \GuzzleHttp\Command\CommandInterface $command) : \GuzzleHttp\Command\Result|\GuzzleHttp\Command\ResultInterface|void|\Psr\Http\Message\ResponseInterface
Deserialize the response into the specified result representation
\Psr\Http\Message\ResponseInterface | $response | |
\Psr\Http\Message\RequestInterface|null | $request | |
\GuzzleHttp\Command\CommandInterface | $command |
visit(\GuzzleHttp\Command\Guzzle\Parameter $model, \Psr\Http\Message\ResponseInterface $response) : \GuzzleHttp\Command\Result|\GuzzleHttp\Command\ResultInterface|void
Handles visit() and after() methods of the Response locations
\GuzzleHttp\Command\Guzzle\Parameter | $model | |
\Psr\Http\Message\ResponseInterface | $response |
handleErrorResponses(\Psr\Http\Message\ResponseInterface $response, \Psr\Http\Message\RequestInterface $request, \GuzzleHttp\Command\CommandInterface $command, \GuzzleHttp\Command\Guzzle\Operation $operation) : mixed
Reads the "errorResponses" from commands, and trigger appropriate exceptions
In order for the exception to be properly triggered, all your exceptions must be instance of "GuzzleHttp\Command\Exception\CommandException". If that's not the case, your exceptions will be wrapped around a CommandException
\Psr\Http\Message\ResponseInterface | $response | |
\Psr\Http\Message\RequestInterface | $request | |
\GuzzleHttp\Command\CommandInterface | $command | |
\GuzzleHttp\Command\Guzzle\Operation | $operation |
triggerBeforeVisitor(string $location, \GuzzleHttp\Command\Guzzle\Parameter $model, \GuzzleHttp\Command\ResultInterface $result, \Psr\Http\Message\ResponseInterface $response, array $context) : \GuzzleHttp\Command\ResultInterface
Handles the before() method of Response locations
string | $location | |
\GuzzleHttp\Command\Guzzle\Parameter | $model | |
\GuzzleHttp\Command\ResultInterface | $result | |
\Psr\Http\Message\ResponseInterface | $response | |
array | $context |
visitOuterObject(\GuzzleHttp\Command\Guzzle\Parameter $model, \GuzzleHttp\Command\ResultInterface $result, \Psr\Http\Message\ResponseInterface $response, array $context) : \GuzzleHttp\Command\ResultInterface
Visits the outer object
\GuzzleHttp\Command\Guzzle\Parameter | $model | |
\GuzzleHttp\Command\ResultInterface | $result | |
\Psr\Http\Message\ResponseInterface | $response | |
array | $context |
visitOuterArray(\GuzzleHttp\Command\Guzzle\Parameter $model, \GuzzleHttp\Command\ResultInterface $result, \Psr\Http\Message\ResponseInterface $response, array $context) : \GuzzleHttp\Command\ResultInterface|void
Visits the outer array
\GuzzleHttp\Command\Guzzle\Parameter | $model | |
\GuzzleHttp\Command\ResultInterface | $result | |
\Psr\Http\Message\ResponseInterface | $response | |
array | $context |