56 if (isset($this->subs[$principalUri])) {
57 return $this->subs[$principalUri];
76 $properties[
'uri'] = $uri;
77 $properties[
'principaluri'] = $principalUri;
78 $properties[
'source'] = $properties[
'{http://calendarserver.org/ns/}source']->getHref();
80 if (!isset($this->subs[$principalUri])) {
81 $this->subs[$principalUri] = [];
84 $id = [$principalUri, count($this->subs[$principalUri]) + 1];
86 $properties[
'id'] =
$id;
88 $this->subs[$principalUri][] = array_merge($properties, [
115 foreach ($this->subs[$subscriptionId[0]] as &$sub) {
117 if ($sub[
'id'][1] === $subscriptionId[1]) {
126 $propPatch->handleRemaining(
function($mutations) use (&$found) {
127 foreach ($mutations as $k => $v) {
143 foreach ($this->subs[$subscriptionId[0]] as
$index => $sub) {
145 if ($sub[
'id'][1] === $subscriptionId[1]) {
146 unset($this->subs[$subscriptionId[0]][
$index]);
This class represents a set of properties that are going to be updated.
if(!array_key_exists('StateId', $_REQUEST)) $id
deleteSubscription($subscriptionId)
Deletes a subscription.
getSubscriptionsForUser($principalUri)
Returns a list of subscriptions for a principal.
Every CalDAV backend must at least implement this interface.
updateSubscription($subscriptionId, DAV\PropPatch $propPatch)
Updates a subscription.
createSubscription($principalUri, $uri, array $properties)
Creates a new subscription for a principal.
This is a mock CalDAV backend that supports subscriptions.