ApiOpenStudio PHPDoc

ConvertToXmlTrait

Trait ConvertToXmlTrait.

Class to cast an input value to XML.

Table of Contents

fromArrayToXml()  : string|null
Convert array to XML string.
fromBooleanToXml()  : string
Convert boolean to XML string.
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.
fromUndefinedToXml()  : string
Convert undefined to XML.
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.

Methods

fromArrayToXml()

Convert array to XML string.

public fromArrayToXml(array<string|int, mixed>|null $array) : string|null
Parameters
$array : array<string|int, mixed>|null
Tags
throws
ApiException
Return values
string|null

fromBooleanToXml()

Convert boolean to XML string.

public fromBooleanToXml(bool|null $boolean) : string
Parameters
$boolean : bool|null
Return values
string

fromFileToXml()

Convert file to XML string.

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

fromFloatToXml()

Convert float to XML string.

public fromFloatToXml(float|null $float) : string
Parameters
$float : float|null
Return values
string

fromHtmlToXml()

Convert an HTML string to XML string.

public fromHtmlToXml(string|null $html) : string
Parameters
$html : string|null
Return values
string

fromImageToXml()

Convert an image string to XML string.

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

fromIntegerToXml()

Convert integer to XML string.

public fromIntegerToXml(int|float|null $integer) : string
Parameters
$integer : int|float|null
Return values
string

fromJsonToXml()

Convert JSON string to XML string.

public fromJsonToXml(string|null $json) : string
Parameters
$json : string|null
Return values
string

fromTextToXml()

Convert text to XML string.

public fromTextToXml(string|null $text) : string
Parameters
$text : string|null
Return values
string

fromUndefinedToXml()

Convert undefined to XML.

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

fromXmlToXml()

Convert XML string to XML string.

public fromXmlToXml(string|null $xml) : string
Parameters
$xml : string|null
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([string $baseTag = 'apiOpenStudioWrapper' ]) : SimpleXMLElement
Parameters
$baseTag : string = 'apiOpenStudioWrapper'
Tags
throws
ApiException
Return values
SimpleXMLElement

Search results