\GuzzleHttp\Command\Guzzle\ResponseLocationXmlLocation

Extracts elements from an XML document

Summary

Methods
Properties
Constants
__construct()
before()
after()
visit()
No public properties found
No constants found
No protected methods found
$locationName
N/A
recursiveProcess()
processArray()
processObject()
xmlToArray()
$xml
N/A

Properties

$locationName

$locationName : string

Type

string

$xml

$xml : \SimpleXMLElement

Type

\SimpleXMLElement — XML document being visited

Methods

__construct()

__construct(string  $locationName = 'xml') : mixed

Set the name of the location

Parameters

string $locationName

Returns

mixed —

before()

before(\GuzzleHttp\Command\ResultInterface  $result, \Psr\Http\Message\ResponseInterface  $response, \GuzzleHttp\Command\Guzzle\Parameter  $model) : \GuzzleHttp\Command\ResultInterface

Called before visiting all parameters. This can be used for seeding the result of a command with default data (e.g. populating with JSON data in the response then adding to the parsed data).

Parameters

\GuzzleHttp\Command\ResultInterface $result
\Psr\Http\Message\ResponseInterface $response
\GuzzleHttp\Command\Guzzle\Parameter $model

Returns

\GuzzleHttp\Command\ResultInterface —

after()

after(\GuzzleHttp\Command\ResultInterface  $result, \Psr\Http\Message\ResponseInterface  $response, \GuzzleHttp\Command\Guzzle\Parameter  $model) : \GuzzleHttp\Command\Result|\GuzzleHttp\Command\ResultInterface

Called after visiting all parameters

Parameters

\GuzzleHttp\Command\ResultInterface $result
\Psr\Http\Message\ResponseInterface $response
\GuzzleHttp\Command\Guzzle\Parameter $model

Returns

\GuzzleHttp\Command\Result|\GuzzleHttp\Command\ResultInterface —

visit()

visit(\GuzzleHttp\Command\ResultInterface  $result, \Psr\Http\Message\ResponseInterface  $response, \GuzzleHttp\Command\Guzzle\Parameter  $param) : \GuzzleHttp\Command\ResultInterface

Called once for each parameter being visited that matches the location type.

Parameters

\GuzzleHttp\Command\ResultInterface $result
\Psr\Http\Message\ResponseInterface $response
\GuzzleHttp\Command\Guzzle\Parameter $param

Returns

\GuzzleHttp\Command\ResultInterface —

recursiveProcess()

recursiveProcess(\GuzzleHttp\Command\Guzzle\Parameter  $param, \SimpleXMLElement  $node) : array

Recursively process a parameter while applying filters

Parameters

\GuzzleHttp\Command\Guzzle\Parameter $param

API parameter being processed

\SimpleXMLElement $node

Node being processed

Returns

array —

processArray()

processArray(\GuzzleHttp\Command\Guzzle\Parameter  $param, \SimpleXMLElement  $node) : array

Parameters

\GuzzleHttp\Command\Guzzle\Parameter $param
\SimpleXMLElement $node

Returns

array —

processObject()

processObject(\GuzzleHttp\Command\Guzzle\Parameter  $param, \SimpleXMLElement  $node) : array

Process an object

Parameters

\GuzzleHttp\Command\Guzzle\Parameter $param

API parameter being parsed

\SimpleXMLElement $node

Value to process

Returns

array —

xmlToArray()

xmlToArray(\SimpleXMLElement  $xml, null  $ns = null, int  $nesting) : array

Convert an XML document to an array.

Parameters

\SimpleXMLElement $xml
null $ns
int $nesting

Returns

array —