Braintree\Xml\Generator::_generateXmlAttribute PHP Method

_generateXmlAttribute() private static method

convert passed data into an array of attributeType, attributeName, and value dates sent as DateTime objects will be converted to strings
private static _generateXmlAttribute ( mixed $value ) : array
$value mixed
return array attributes and element value
    private static function _generateXmlAttribute($value)
    {
        if ($value instanceof DateTime) {
            return ['type', 'datetime', self::_dateTimeToXmlTimestamp($value)];
        }
        if (is_int($value)) {
            return ['type', 'integer', $value];
        }
        if (is_bool($value)) {
            return ['type', 'boolean', $value ? 'true' : 'false'];
        }
        if ($value === NULL) {
            return ['nil', 'true', $value];
        }
    }