Class Guzzle\Service\Command\LocationVisitor\Response\JsonVisitor

InheritanceGuzzle\Service\Command\LocationVisitor\Response\JsonVisitor » Guzzle\Service\Command\LocationVisitor\Response\AbstractResponseVisitor
ImplementsGuzzle\Service\Command\LocationVisitor\Response\ResponseVisitorInterface

Location visitor used to marshal JSON response data into a formatted array.

Allows top level JSON parameters to be inserted into the result of a command. The top level attributes are grabbed from the response's JSON data using the name value by default. Filters can be applied to parameters as they are traversed. This allows data to be normalized before returning it to users (for example converting timestamps to DateTime objects).

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
recursiveProcess() Recursively process a parameter while applying filters Guzzle\Service\Command\LocationVisitor\Response\JsonVisitor

Method Details

before() public method

public void before ( Guzzle\Service\Command\CommandInterface $command, array &$result )
$command
$result
recursiveProcess() protected method

Recursively process a parameter while applying filters

protected void recursiveProcess ( Guzzle\Service\Description\Parameter $param, &$value )
$param Guzzle\Service\Description\Parameter

API parameter being validated

$value mixed

Value to validate and process. The value may change during this process.

visit() public method

public void visit ( Guzzle\Service\Command\CommandInterface $command, Guzzle\Http\Message\Response $response, Guzzle\Service\Description\Parameter $param, &$value, $context null )
$command
$response
$param
$value
$context