PHP Класс XmlSerializer, googleads-php-lib

Наследование: extends Serializer
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ConvertObjectToXml ( mixed $object, string $rootElementName, boolean $useXsiType ) : string Converts an object to an XML string. The root element name is passed in as a parameter, and each field of the object becomes a child element. Array values are represented by multiples instances of that element. Methods on the object are ignored.

Приватные методы

Метод Описание
ConvertObjectToElement ( mixed $object, string $elementName, DOMDocument $document, boolean $useXsiType ) : DOMElement Converts an object to a DOMElement.
ConvertObjectToNodeValue ( mixed $object ) Converts a PHP value to a string for use in an XML node value.
CreateChildListForObjects ( object $object, DOMDocument $document, boolean $useXsiType ) : array Creates an array of child elements for objects.
CreateChildListForOrderedArrays ( array $orderedArray, DOMDocument $document, boolean $useXsiType ) : array Creates an array of child elements for ordered arrays.

Описание методов

ConvertObjectToXml() публичный Метод

Converts an object to an XML string. The root element name is passed in as a parameter, and each field of the object becomes a child element. Array values are represented by multiples instances of that element. Methods on the object are ignored.
public ConvertObjectToXml ( mixed $object, string $rootElementName, boolean $useXsiType ) : string
$object mixed the object to serialize
$rootElementName string the name of the root element
$useXsiType boolean whether the xsi:type will be added into XML tags when available
Результат string the XML serialized string of the object