Deserializers
in package
Contains static deserializer functions to be used with Sabre/XML.
Tags
Table of Contents
- deserializeHrefMulti() : array<int, string>
- Deserializes a multiple DAV:href child elements to an array of strings.
- deserializeHrefSingle() : string|null
- Deserializes a single DAV:href child element to a string.
- deserializeSupportedAddrData() : array<string|int, mixed>
- Deserializes a CARDDAV:supported-address-data element (RFC 6352).
- deserializeSupportedReportSet() : array<int, string>
- Deserializes XML DAV:supported-report-set elements to an array (RFC3253).
- deserializeToAttributes() : array<string|int, mixed>
- Deserializes an XML element to an array of its attributes, discarding its contents.
Methods
deserializeHrefMulti()
Deserializes a multiple DAV:href child elements to an array of strings.
public
static deserializeHrefMulti(Reader $reader) : array<int, string>
Parameters
- $reader : Reader
Tags
Return values
array<int, string> —An array of strings, each representing the value of a href child element. Empty array if no href child elements present.
deserializeHrefSingle()
Deserializes a single DAV:href child element to a string.
public
static deserializeHrefSingle(Reader $reader) : string|null
Parameters
- $reader : Reader
Return values
string|null —If no href child element is present, null is returned. If multiple href child elements are present, the value of the first one is returned.
deserializeSupportedAddrData()
Deserializes a CARDDAV:supported-address-data element (RFC 6352).
public
static deserializeSupportedAddrData(Reader $reader) : array<string|int, mixed>
It contains one or more CARDDAV:address-data-type elements.
Parameters
- $reader : Reader
Return values
array<string|int, mixed> —deserializeSupportedReportSet()
Deserializes XML DAV:supported-report-set elements to an array (RFC3253).
public
static deserializeSupportedReportSet(Reader $reader) : array<int, string>
Per RFC3252, arbitrary report element types are nested within the DAV:supported-report-set element. Example:
<supported-report-set>
<supported-report> <--- 0+ supported-report elements -->
<report> <--- 1 each containing exactly one report element -->
<sync-collection/> <--- 1 containing exactly one ANY element for the corresponding report -->
</report>
</supported-report>
<supported-report>
<report>
<addressbook-multiget xmlns="urn:ietf:params:xml:ns:carddav"/>
</report>
</supported-report>
</supported-report-set>
Parameters
- $reader : Reader
Tags
Return values
array<int, string> —Array with the element names of the supported reports.
deserializeToAttributes()
Deserializes an XML element to an array of its attributes, discarding its contents.
public
static deserializeToAttributes(Reader $reader) : array<string|int, mixed>
@return array<string, string> Mapping attribute names to values.
Parameters
- $reader : Reader