ApiOpenStudio PHPDoc

ConvertToXmlTrait

Trait ConvertToXmlTrait.

Class to cast an input value to XML.

Table of Contents

fromArrayToXml()  : string
Convert array to XML string.
fromBooleanToXml()  : string
Convert boolean to XML string.
fromEmptyToXml()  : null
Convert empty to XML.
fromFileToXml()  : string
Convert file to XML string.
fromFloatToXml()  : string
Convert float to XML string.
fromHtmlToXml()  : string
Convert an HTML string to XML string.
fromImageToXml()  : string
Convert an image string to XML string.
fromIntegerToXml()  : string
Convert integer to XML string.
fromJsonToXml()  : string
Convert JSON string to XML string.
fromTextToXml()  : string
Convert text to XML string.
fromXmlToXml()  : string
Convert XML string to XML string.
array2xml()  : string
Recursive method to convert an array into XML format.
getBaseXmlWrapper()  : SimpleXMLElement
Get the base SimpleXMLElement wrapper for XML for converting non XML inputs to XML output.
wrapDataXmlFormat()  : string
Wrap Data in MML string wrapper.

Methods

fromArrayToXml()

Convert array to XML string.

public fromArrayToXml( $data) : string
Parameters
$data :
Tags
throws
ApiException
Return values
string

fromBooleanToXml()

Convert boolean to XML string.

public fromBooleanToXml( $data) : string
Parameters
$data :
Return values
string

fromEmptyToXml()

Convert empty to XML.

public fromEmptyToXml( $data) : null
Parameters
$data :
Return values
null

fromFileToXml()

Convert file to XML string.

public fromFileToXml( $data) : string
Parameters
$data :
Return values
string

fromFloatToXml()

Convert float to XML string.

public fromFloatToXml( $data) : string
Parameters
$data :
Return values
string

fromHtmlToXml()

Convert an HTML string to XML string.

public fromHtmlToXml( $data) : string
Parameters
$data :
Return values
string

fromImageToXml()

Convert an image string to XML string.

public fromImageToXml( $data) : string
Parameters
$data :
Return values
string

fromIntegerToXml()

Convert integer to XML string.

public fromIntegerToXml( $data) : string
Parameters
$data :
Return values
string

fromJsonToXml()

Convert JSON string to XML string.

public fromJsonToXml( $data) : string
Parameters
$data :
Tags
throws
ApiException
Return values
string

fromTextToXml()

Convert text to XML string.

public fromTextToXml( $data) : string
Parameters
$data :
Return values
string

fromXmlToXml()

Convert XML string to XML string.

public fromXmlToXml( $data) : string
Parameters
$data :
Return values
string

array2xml()

Recursive method to convert an array into XML format.

protected array2xml(array<string|int, mixed> $array, SimpleXMLElement $xml) : string
Parameters
$array : array<string|int, mixed>

Input array.

$xml : SimpleXMLElement

A SimpleXMLElement element.

Return values
string

A populated SimpleXMLElement.

getBaseXmlWrapper()

Get the base SimpleXMLElement wrapper for XML for converting non XML inputs to XML output.

protected getBaseXmlWrapper() : SimpleXMLElement
Tags
throws
ApiException
Return values
SimpleXMLElement

wrapDataXmlFormat()

Wrap Data in MML string wrapper.

protected wrapDataXmlFormat( $data) : string
Parameters
$data :
Return values
string

Search results