Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct (VisitorFlyweight $factory, $schemaInModels=false) | |
addVisitor ($location, ResponseVisitorInterface $visitor) | |
![]() | |
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 | $instance |
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.
Guzzle\Service\Command\OperationResponseParser::__construct | ( | VisitorFlyweight | $factory, |
$schemaInModels = false |
|||
) |
VisitorFlyweight | $factory | Factory to use when creating visitors |
bool | $schemaInModels | Set to true to inject schemas into models |
Definition at line 51 of file OperationResponseParser.php.
References Guzzle\Service\Command\OperationResponseParser\$factory.
Guzzle\Service\Command\OperationResponseParser::addVisitor | ( | $location, | |
ResponseVisitorInterface | $visitor | ||
) |
Add a location visitor to the command
string | $location | Location to associate with the visitor |
ResponseVisitorInterface | $visitor | Visitor to attach |
Definition at line 65 of file OperationResponseParser.php.
|
static |
Reimplemented from Guzzle\Service\Command\DefaultResponseParser.
Definition at line 38 of file OperationResponseParser.php.
References Guzzle\Service\Command\LocationVisitor\VisitorFlyweight\getInstance().
Referenced by Guzzle\Service\Command\OperationCommand\getResponseParser(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testAdditionalPropertiesDisabledDiscardsData(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testAdditionalPropertiesWithRefAreResolved(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testAllowsModelProcessingToBeDisabled(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testCreatesCustomResponseClassInterface(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testDoesNotParseXmlWhenNotUsingXmlVisitor(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testEnsuresResponseClassExists(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testEnsuresResponseClassImplementsResponseClassInterface(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testSkipsUnkownModels(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testVisitsAdditionalProperties(), and Guzzle\Tests\Service\Command\OperationResponseParserTest\testVisitsLocationsForJsonResponse().
|
protected |
Reimplemented from Guzzle\Service\Command\DefaultResponseParser.
Definition at line 72 of file OperationResponseParser.php.
References Guzzle\Service\Command\CommandInterface\getOperation(), Guzzle\Service\Command\OperationResponseParser\parseClass(), Guzzle\Service\Command\AbstractCommand\RESPONSE_PROCESSING, Guzzle\Service\Description\OperationInterface\TYPE_CLASS, Guzzle\Service\Description\OperationInterface\TYPE_MODEL, Guzzle\Service\Command\AbstractCommand\TYPE_MODEL, and Guzzle\Service\Command\OperationResponseParser\visitResult().
|
protected |
Parse a class object
CommandInterface | $command | Command to parse into an object |
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().
|
protected |
Definition at line 171 of file OperationResponseParser.php.
References Guzzle\Service\Description\Parameter\getLocation(), Guzzle\Service\Description\Parameter\getProperty(), and Guzzle\Service\Description\Parameter\setName().
Referenced by Guzzle\Service\Command\OperationResponseParser\visitResult().
|
protected |
Perform transformations on the result array
Parameter | $model | Model that defines the structure |
CommandInterface | $command | Command that performed the operation |
Response | $response | Response received |
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().
|
protected |
$factory Visitor factory
Definition at line 23 of file OperationResponseParser.php.
Referenced by Guzzle\Service\Command\OperationResponseParser\__construct().
|
staticprotected |
Definition at line 27 of file OperationResponseParser.php.