76 $reader->pushContext();
78 $reader->elementMap[
'{DAV:}prop'] =
'Sabre\Xml\Element\Elements';
81 $reader->popContext();
88 foreach ($required as $elem) {
89 if (!array_key_exists($elem, $elems)) {
90 throw new BadRequest(
'The ' . $elem .
' element in the {DAV:}sync-collection report is required');
95 $self->properties = $elems[
'{DAV:}prop'];
96 $self->syncToken = $elems[
'{DAV:}sync-token'];
98 if (isset($elems[
'{DAV:}limit'])) {
100 foreach ($elems[
'{DAV:}limit'] as $child) {
101 if ($child[
'name'] ===
'{DAV:}nresults') {
102 $nresults = (int)$child[
'value'];
105 $self->limit = $nresults;
108 if (isset($elems[
'{DAV:}sync-level'])) {
110 $value = $elems[
'{DAV:}sync-level'];
111 if ($value ===
'infinity') {
114 $self->syncLevel = $value;
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
SyncCollection request parser.
const DEPTH_INFINITY
Infinity is used for some request supporting the HTTP Depth header and indicates that the operation s...
static xmlDeserialize(Xml\Reader $reader)
The deserialize method is called during xml parsing.
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...