\Guzzle\Service\CommandOperationResponseParser

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

Summary

Methods
Properties
Constants
getInstance()
parse()
__construct()
addVisitor()
No public properties found
No constants found
handleParsing()
parseClass()
visitResult()
visitAdditionalProperties()
$instance
$factory
N/A
No private methods found
$schemaInModels
N/A

Properties

$instance

$instance : self

Type

self

$schemaInModels

$schemaInModels : boolean

Type

boolean

Methods

getInstance()

getInstance() : self

Returns

self

parse()

parse(\Guzzle\Service\Command\CommandInterface  $command) : mixed

Parse the HTTP response received by the command and update the command's result contents

Parameters

\Guzzle\Service\Command\CommandInterface $command

Command to parse and update

Returns

mixed —

Returns the result to set on the command

__construct()

__construct(\Guzzle\Service\Command\LocationVisitor\VisitorFlyweight  $factory, boolean  $schemaInModels = false) 

Parameters

\Guzzle\Service\Command\LocationVisitor\VisitorFlyweight $factory

Factory to use when creating visitors

boolean $schemaInModels

Set to true to inject schemas into models

parseClass()

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

Parse a class object

Parameters

\Guzzle\Service\Command\CommandInterface $command

Command to parse into an object

Throws

\Guzzle\Service\Exception\ResponseClassException

Returns

mixed

visitResult()

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

Perform transformations on the result array

Parameters

\Guzzle\Service\Description\Parameter $model

Model that defines the structure

\Guzzle\Service\Command\CommandInterface $command

Command that performed the operation

\Guzzle\Http\Message\Response $response

Response received

Returns

array —

Returns the array of result data