Class Guzzle\Service\Command\OperationResponseParser

InheritanceGuzzle\Service\Command\OperationResponseParser » Guzzle\Service\Command\DefaultResponseParser
ImplementsGuzzle\Service\Command\ResponseParserInterface

Response parser that attempts to marshal responses into an associative array based on models in a service description

Property Details

$factory protected property

Visitor factory

$instance protected static property
protected static self $instance null

Method Details

__construct() public method

public void __construct ( Guzzle\Service\Command\LocationVisitor\VisitorFlyweight $factory, $schemaInModels false )
$factory Guzzle\Service\Command\LocationVisitor\VisitorFlyweight

Factory to use when creating visitors

$schemaInModels bool

Set to true to inject schemas into models

addVisitor() public method

Add a location visitor to the command

public self addVisitor ( $location, Guzzle\Service\Command\LocationVisitor\Response\ResponseVisitorInterface $visitor )
$location string

Location to associate with the visitor

$visitor Guzzle\Service\Command\LocationVisitor\Response\ResponseVisitorInterface

Visitor to attach

getInstance() public static method

public static self getInstance ( )
handleParsing() protected method

protected void handleParsing ( Guzzle\Service\Command\CommandInterface $command, Guzzle\Http\Message\Response $response, $contentType )
$command
$response
$contentType
parseClass() protected method

Parse a class object

protected mixed parseClass ( Guzzle\Service\Command\CommandInterface $command )
$command Guzzle\Service\Command\CommandInterface

Command to parse into an object

throws Guzzle\Service\Exception\ResponseClassException
visitAdditionalProperties() protected method

protected void visitAdditionalProperties ( Guzzle\Service\Description\Parameter $model, Guzzle\Service\Command\CommandInterface $command, Guzzle\Http\Message\Response $response, Guzzle\Service\Description\Parameter $additional, &$result, array &$foundVisitors )
$model
$command
$response
$additional
$result
$foundVisitors
visitResult() protected method

Perform transformations on the result array

protected array visitResult ( Guzzle\Service\Description\Parameter $model, Guzzle\Service\Command\CommandInterface $command, Guzzle\Http\Message\Response $response )
$model Guzzle\Service\Description\Parameter

Model that defines the structure

$command Guzzle\Service\Command\CommandInterface

Command that performed the operation

$response Guzzle\Http\Message\Response

Response received

return array

Returns the array of result data