31 foreach ($this->
select(
'FREEBUSY') as $freebusy) {
35 if (isset($freebusy[
'FBTYPE']) && strtoupper(substr((
string)$freebusy[
'FBTYPE'], 0, 4)) !==
'BUSY') {
41 $periods = explode(
',', (
string)$freebusy);
43 foreach ($periods as $period) {
47 list($busyStart, $busyEnd) = explode(
'/', $period);
51 if ($busyEnd instanceof \DateInterval) {
52 $busyEnd = $busyStart->add($busyEnd);
55 if ($start < $busyEnd && $end > $busyStart) {
97 'REQUEST-STATUS' =>
'*',
An exception for terminatinating execution or to throw for unit testing.
isFree(DateTimeInterface $start, DatetimeInterface $end)
Checks based on the contained FREEBUSY information, if a timeslot is available.
select($name)
Returns an array with elements that match the specified name.
static parse($date, $referenceTz=null)
Parses either a Date or DateTime, or Duration value.