46 if ($reader->isEmptyElement) {
56 if ($reader->nodeType === Reader::ELEMENT) {
59 $values[$clark] = self::parseCurrentElement($reader)[
'value'];
65 }
while ($reader->nodeType !== Reader::END_ELEMENT);
90 if (array_key_exists(
$name, $reader->elementMap)) {
91 $deserializer = $reader->elementMap[
$name];
92 if (is_subclass_of($deserializer,
'Sabre\\Xml\\XmlDeserializable')) {
93 $value = call_user_func([$deserializer,
'xmlDeserialize'], $reader);
94 } elseif (is_callable($deserializer)) {
95 $value = call_user_func($deserializer, $reader);
97 $type = gettype($deserializer);
98 if (
$type ===
'string') {
99 $type .=
' (' . $deserializer .
')';
100 } elseif (
$type ===
'object') {
101 $type .=
' (' . get_class($deserializer) .
')';
103 throw new \LogicException(
'Could not use this type as a deserializer: ' .
$type);
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
static parseCurrentElement(Reader $reader)
This function behaves similar to Sabre::parseCurrentElement, but instead of creating deep xml array s...
The Reader class expands upon PHP's built-in XMLReader.
Implementing the XmlDeserializable interface allows you to use a class as a deserializer for a specif...
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
This class is responsible for decoding the {DAV:}prop element as it appears in {DAV:}property-update...
getClark()
Returns the current nodename in clark-notation.