\GuzzleHttp\Command\Guzzle\ResponseLocationResponseLocationInterface

Location visitor used to parse values out of a response into an associative array

Summary

Methods
Constants
before()
after()
visit()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

before()

before(\GuzzleHttp\Command\ResultInterface  $result, \Psr\Http\Message\ResponseInterface  $response, \GuzzleHttp\Command\Guzzle\Parameter  $model) : \GuzzleHttp\Command\ResultInterface

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).

Parameters

\GuzzleHttp\Command\ResultInterface $result

Result being created

\Psr\Http\Message\ResponseInterface $response

Response being visited

\GuzzleHttp\Command\Guzzle\Parameter $model

Response model

Returns

\GuzzleHttp\Command\ResultInterface —

Modified result

after()

after(\GuzzleHttp\Command\ResultInterface  $result, \Psr\Http\Message\ResponseInterface  $response, \GuzzleHttp\Command\Guzzle\Parameter  $model) : \GuzzleHttp\Command\ResultInterface

Called after visiting all parameters

Parameters

\GuzzleHttp\Command\ResultInterface $result

Result being created

\Psr\Http\Message\ResponseInterface $response

Response being visited

\GuzzleHttp\Command\Guzzle\Parameter $model

Response model

Returns

\GuzzleHttp\Command\ResultInterface —

Modified result

visit()

visit(\GuzzleHttp\Command\ResultInterface  $result, \Psr\Http\Message\ResponseInterface  $response, \GuzzleHttp\Command\Guzzle\Parameter  $param) : \GuzzleHttp\Command\ResultInterface

Called once for each parameter being visited that matches the location type.

Parameters

\GuzzleHttp\Command\ResultInterface $result

Result being created

\Psr\Http\Message\ResponseInterface $response

Response being visited

\GuzzleHttp\Command\Guzzle\Parameter $param

Parameter being visited

Returns

\GuzzleHttp\Command\ResultInterface —

Modified result