PHP Class Braintree\Xml\Generator

Show file Open project: braintree/braintree_php

Public Methods

Method Description
arrayToXml ( array $aData ) : string arrays passed to this method should have a single root element with an array as its value

Private Methods

Method Description
_castDateTime ( $string )
_createElementsFromArray ( object &$writer, array $aData ) : void Construct XML elements with attributes from an associative array.
_dateTimeToXmlTimestamp ( object $dateTime ) : string converts datetime back to xml schema format
_generateXmlAttribute ( mixed $value ) : array convert passed data into an array of attributeType, attributeName, and value dates sent as DateTime objects will be converted to strings

Method Details

arrayToXml() public static method

arrays passed to this method should have a single root element with an array as its value
public static arrayToXml ( array $aData ) : string
$aData array the array of data
return string XML string