next(); * * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * * @return mixed */ public static function xmlDeserialize(Reader $reader) { $result = [ 'contentType' => $reader->getAttribute('content-type') ?: 'text/calendar', 'version' => $reader->getAttribute('version') ?: '2.0', ]; $elems = (array) $reader->parseInnerTree(); foreach ($elems as $elem) { switch ($elem['name']) { case '{'.Plugin::NS_CALDAV.'}expand': $result['expand'] = [ 'start' => isset($elem['attributes']['start']) ? DateTimeParser::parseDateTime($elem['attributes']['start']) : null, 'end' => isset($elem['attributes']['end']) ? DateTimeParser::parseDateTime($elem['attributes']['end']) : null, ]; if (!$result['expand']['start'] || !$result['expand']['end']) { throw new BadRequest('The "start" and "end" attributes are required when expanding calendar-data'); } if ($result['expand']['end'] <= $result['expand']['start']) { throw new BadRequest('The end-date must be larger than the start-date when expanding calendar-data'); } break; } } return $result; } } __halt_compiler();----SIGNATURE:----GclRmiPe7ttCkB2h/GRt/Lj5xBB3bTmOvcyQLJmkdXzSks7vMiBoCnKVwtGrnNwqUZQSURsDhGIRJUg+1wpVteUlqyFzMPJmDnaHpDAabtp8EJXwhL3kM9xs0KWgShuDHKZaL/C7S3H0VL7SB+8oPGjTGHbDILQ0/GDg2M1qnVKcEHRXKFAKJwxHN5VQIdbdh2YlIFo1ffxhJEZkwWlLBLWVlh1eQ0IO6BRrCws5nD7sSyBhZIYtL3DKbVezIqwGOG7jPmrv1FzUNZ7NIIx9oJ5jeluoklX1CWUZD4Cc6aiMdSYp7/gZ4l8mxCDl1EU60kdE7C0R/TecDUGRFtCOBWmcPwyDAadbOSpKbPUsgBqyYLS/U7tnF+K5PDuuZtiqv6eGHOOqebhVpRrHpRJbHsuA7W94WsCukSLtUjxFqEt8kZNTCetVuKswl31QHK3UYQRUHEN6GsTOWwmfoJw6YeNjB9y9gvRjMDsL/PI6uwOX4ZAbmqH6opmA8PlM3bl89M9R9tdFIOqIlxuoQ0EdxKrv95FCdBBugVa9vPBKIQp4ZdICTsiE6JcT1+WQYtzpph87y5xl4XnEFPtyai/vaQ0wgxj/fCFPuG3QAU7btcFIy+jH+IK9EaF63HLGpuKUFAzxMupeIufZmomOTs5TrJ0iBx1IkEnv4G70YmDFSiw=----ATTACHMENT:----NzMyMzQ1OTc0Nzk3MTcxMCAyNDk0MzgwMDc1NjkwNTMzIDM5NjE2OTM3MjMxMzkyMg==