caldavBackend = $caldavBackend; $this->principalUri = $principalUri; $this->notification = $notification; } /** * Returns the path name for this notification * * @return string */ function getName() { return $this->notification->getId() . '.xml'; } /** * Returns the etag for the notification. * * The etag must be surrounded by litteral double-quotes. * * @return string */ function getETag() { return $this->notification->getETag(); } /** * This method must return an xml element, using the * Sabre\CalDAV\Xml\Notification\NotificationInterface classes. * * @return NotificationInterface */ function getNotificationType() { return $this->notification; } /** * Deletes this notification * * @return void */ function delete() { $this->caldavBackend->deleteNotification($this->getOwner(), $this->notification); } /** * Returns the owner principal * * This must be a url to a principal, or null if there's no owner * * @return string|null */ function getOwner() { return $this->principalUri; } }