\Heidelpay\PhpApiPush

Push XML Mapper

Parses heidelpay Push Responses to a PhpApi Response object.

Summary

Methods
Properties
Constants
__construct()
setRawResponse()
getResponse()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
parseXmlResponse()
getMappingClass()
getResponseParameterGroups()
isParameterGroupGetter()
setParameterGroupProperties()
$xmlResponse
$response
$mapping
N/A

Properties

$xmlResponse

$xmlResponse : string

The raw XML response

Type

string

$response

$response : \Heidelpay\PhpApi\Response

The PhpApi Response object that will be the result

Type

\Heidelpay\PhpApi\Response

$mapping

$mapping : array

Mapping array to determine which parameter group has to be mapped by which mapping class

Type

array

Methods

__construct()

__construct(string  $xmlResponse = null) 

Push constructor.

Parameters

string $xmlResponse

a raw string in xml format

setRawResponse()

setRawResponse(string  $response) 

If not setted in contructor, set the raw xml response

Parameters

string $response

getResponse()

getResponse() : \Heidelpay\PhpApi\Response|null

Return the Response object

If not set, parse the xml response and create the response. Then return it.

Returns

\Heidelpay\PhpApi\Response|null

parseXmlResponse()

parseXmlResponse() 

Parses the raw XML response and maps the attributes to a PhpApi Response.

getMappingClass()

getMappingClass(  $parameterGroupInstance) : string|null

If a Mapping Class for the given parameter group instance is given, return the class name of it.

Parameters

$parameterGroupInstance

Returns

string|null

getResponseParameterGroups()

getResponseParameterGroups(\Heidelpay\PhpApi\Response  $responseInstance) : array

Get the ParameterGroup Getters of the Response instance.

Parameters

\Heidelpay\PhpApi\Response $responseInstance

Returns

array

isParameterGroupGetter()

isParameterGroupGetter(  $methodName) : boolean

Validates if the given getter is for a ParameterGroup.

Parameters

$methodName

Returns

boolean

setParameterGroupProperties()

setParameterGroupProperties(\Heidelpay\PhpApi\ParameterGroups\AbstractParameterGroup  $parameterGroupInstance, \Heidelpay\PhpApi\PushMapping\PushMappingInterface  $mappingClassInstance, \SimpleXMLElement  $xmlResponse) 

Sets the properties of the ParameterGroup instance by mapping the attributes from the Mapping class

Parameters

\Heidelpay\PhpApi\ParameterGroups\AbstractParameterGroup $parameterGroupInstance
\Heidelpay\PhpApi\PushMapping\PushMappingInterface $mappingClassInstance
\SimpleXMLElement $xmlResponse