Open Journal Systems  3.3.0
Guzzle\Service\Command\OperationResponseParser Class Reference
Inheritance diagram for Guzzle\Service\Command\OperationResponseParser:
Guzzle\Service\Command\DefaultResponseParser Guzzle\Service\Command\ResponseParserInterface

Public Member Functions

 __construct (VisitorFlyweight $factory, $schemaInModels=false)
 
 addVisitor ($location, ResponseVisitorInterface $visitor)
 
- Public Member Functions inherited from Guzzle\Service\Command\DefaultResponseParser
 parse (CommandInterface $command)
 

Static Public Member Functions

static getInstance ()
 

Protected Member Functions

 handleParsing (CommandInterface $command, Response $response, $contentType)
 
 parseClass (CommandInterface $command)
 
 visitAdditionalProperties (Parameter $model, CommandInterface $command, Response $response, Parameter $additional, &$result, array &$foundVisitors)
 
 visitResult (Parameter $model, CommandInterface $command, Response $response)
 

Protected Attributes

 $factory
 

Static Protected Attributes

static $instance
 
- Static Protected Attributes inherited from Guzzle\Service\Command\DefaultResponseParser
static $instance
 

Detailed Description

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

Definition at line 17 of file OperationResponseParser.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Service\Command\OperationResponseParser::__construct ( VisitorFlyweight  $factory,
  $schemaInModels = false 
)
Parameters
VisitorFlyweight$factoryFactory to use when creating visitors
bool$schemaInModelsSet to true to inject schemas into models

Definition at line 51 of file OperationResponseParser.php.

References Guzzle\Service\Command\OperationResponseParser\$factory.

Member Function Documentation

◆ addVisitor()

Guzzle\Service\Command\OperationResponseParser::addVisitor (   $location,
ResponseVisitorInterface  $visitor 
)

Add a location visitor to the command

Parameters
string$locationLocation to associate with the visitor
ResponseVisitorInterface$visitorVisitor to attach
Returns
self

Definition at line 65 of file OperationResponseParser.php.

◆ getInstance()

◆ handleParsing()

◆ parseClass()

Guzzle\Service\Command\OperationResponseParser::parseClass ( CommandInterface  $command)
protected

Parse a class object

Parameters
CommandInterface$commandCommand to parse into an object
Returns
mixed
Exceptions
ResponseClassException

Definition at line 104 of file OperationResponseParser.php.

References Guzzle\Service\Command\CommandInterface\getClient(), and Guzzle\Service\Command\CommandInterface\getOperation().

Referenced by Guzzle\Service\Command\OperationResponseParser\handleParsing().

◆ visitAdditionalProperties()

Guzzle\Service\Command\OperationResponseParser::visitAdditionalProperties ( Parameter  $model,
CommandInterface  $command,
Response  $response,
Parameter  $additional,
$result,
array &  $foundVisitors 
)
protected

◆ visitResult()

Guzzle\Service\Command\OperationResponseParser::visitResult ( Parameter  $model,
CommandInterface  $command,
Response  $response 
)
protected

Perform transformations on the result array

Parameters
Parameter$modelModel that defines the structure
CommandInterface$commandCommand that performed the operation
Response$responseResponse received
Returns
array Returns the array of result data

Definition at line 130 of file OperationResponseParser.php.

References Guzzle\Service\Description\Parameter\getAdditionalProperties(), Guzzle\Service\Description\Parameter\getProperties(), and Guzzle\Service\Command\OperationResponseParser\visitAdditionalProperties().

Referenced by Guzzle\Service\Command\OperationResponseParser\handleParsing().

Field Documentation

◆ $factory

VisitorFlyweight Guzzle\Service\Command\OperationResponseParser::$factory
protected

$factory Visitor factory

Definition at line 23 of file OperationResponseParser.php.

Referenced by Guzzle\Service\Command\OperationResponseParser\__construct().

◆ $instance

Guzzle\Service\Command\OperationResponseParser::$instance
staticprotected

Definition at line 27 of file OperationResponseParser.php.


The documentation for this class was generated from the following file: