66 foreach ((array)
$reader->parseInnerTree([]) as $elem) {
68 if ($elem[
'name'] !== $timeRange)
continue;
70 $start = empty($elem[
'attributes'][
'start']) ?: $elem[
'attributes'][
'start'];
71 $end = empty($elem[
'attributes'][
'end']) ?: $elem[
'attributes'][
'end'];
75 throw new BadRequest(
'The freebusy report must have a time-range element');
An exception for terminatinating execution or to throw for unit testing.
const NS_CALDAV
This is the official CalDAV namespace.
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
static parseDateTime($dt, DateTimeZone $tz=null)
Parses an iCalendar (rfc5545) formatted datetime and returns a DateTimeImmutable object.
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...