calDavBackend->getSubscriptionsForUser($principalUri); if (count($calendarUris) > 0) { $calendarInfos = array_filter($calendarInfos, fn (array $subscription) => in_array($subscription['uri'], $calendarUris)); } $calendarInfos = array_values(array_filter($calendarInfos)); $iCalendars = []; foreach ($calendarInfos as $calendarInfo) { $calendar = new CachedSubscription($this->calDavBackend, $calendarInfo); $iCalendars[] = new CachedSubscriptionImpl( $calendar, $calendarInfo, $this->calDavBackend, ); } return $iCalendars; } }