Documentation

XmlErrorParser extends AbstractErrorParser
in package
Uses PayloadParserTrait

Parses XML errors.

Table of Contents

$api  : Service
$parser  : mixed
__construct()  : mixed
__invoke()  : mixed
extractHeader()  : mixed
Extract a single header from the response into the result.
extractHeaders()  : mixed
Extract a map of headers with an optional prefix from the response.
extractPayload()  : mixed
extractStatus()  : mixed
Places the status code of the response into the result array.
parseXml()  : SimpleXMLElement
payload()  : mixed
populateShape()  : mixed
registerNamespacePrefix()  : mixed
parseBody()  : mixed
parseHeaders()  : mixed
parseJson()  : array<string|int, mixed>

Properties

Methods

__construct()

public __construct([Service $api = null ][, XmlParser $parser = null ]) : mixed
Parameters
$api : Service = null
$parser : XmlParser = null
Return values
mixed

extractStatus()

Places the status code of the response into the result array.

protected extractStatus(mixed $name, ResponseInterface $response, array<string|int, mixed> &$result) : mixed
Parameters
$name : mixed
$response : ResponseInterface
$result : array<string|int, mixed>
Return values
mixed

parseXml()

protected parseXml(string $xml, mixed $response) : SimpleXMLElement
Parameters
$xml : string
$response : mixed
Tags
throws
ParserException
Return values
SimpleXMLElement

registerNamespacePrefix()

protected registerNamespacePrefix(SimpleXMLElement $element) : mixed
Parameters
$element : SimpleXMLElement
Return values
mixed

parseBody()

private parseBody(SimpleXMLElement $body, array<string|int, mixed> &$data) : mixed
Parameters
$body : SimpleXMLElement
$data : array<string|int, mixed>
Return values
mixed

parseJson()

private parseJson(string $json, mixed $response) : array<string|int, mixed>
Parameters
$json : string
$response : mixed
Tags
throws
ParserException
Return values
array<string|int, mixed>

Search results