DefaultResponseParser
in package
implements
ResponseParserInterface
Default HTTP response parser used to marshal JSON responses into arrays and XML responses into SimpleXMLElement
Table of Contents
Interfaces
- ResponseParserInterface
- Parses the HTTP response of a command and sets the appropriate result on a command object
Properties
- $instance : self
Methods
- getInstance() : self
- parse() : mixed
- Parse the HTTP response received by the command and update the command's result contents
- handleParsing() : mixed
Properties
$instance
protected
static self
$instance
Methods
getInstance()
public
static getInstance() : self
Tags
Return values
selfparse()
Parse the HTTP response received by the command and update the command's result contents
public
parse(CommandInterface $command) : mixed
Parameters
- $command : CommandInterface
-
Command to parse and update
Return values
mixed —Returns the result to set on the command
handleParsing()
protected
handleParsing(CommandInterface $command, Response $response, mixed $contentType) : mixed
Parameters
- $command : CommandInterface
- $response : Response
- $contentType : mixed