ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Node.php
Go to the documentation of this file.
1 <?php
2 
4 
5 use Sabre\CalDAV;
7 use Sabre\DAV;
8 use Sabre\DAVACL;
9 
21 class Node extends DAV\File implements INode, DAVACL\IACL {
22 
23  use DAVACL\ACLTrait;
24 
30  protected $caldavBackend;
31 
37  protected $notification;
38 
44  protected $principalUri;
45 
53  function __construct(CalDAV\Backend\NotificationSupport $caldavBackend, $principalUri, NotificationInterface $notification) {
54 
55  $this->caldavBackend = $caldavBackend;
56  $this->principalUri = $principalUri;
57  $this->notification = $notification;
58 
59  }
60 
66  function getName() {
67 
68  return $this->notification->getId() . '.xml';
69 
70  }
71 
79  function getETag() {
80 
81  return $this->notification->getETag();
82 
83  }
84 
91  function getNotificationType() {
92 
93  return $this->notification;
94 
95  }
96 
102  function delete() {
103 
104  $this->caldavBackend->deleteNotification($this->getOwner(), $this->notification);
105 
106  }
107 
115  function getOwner() {
116 
117  return $this->principalUri;
118 
119  }
120 
121 }
getName()
Returns the path name for this notification.
Definition: Node.php:66
This node represents a single notification.
Definition: Node.php:21
File class.
Definition: File.php:15
getOwner()
Returns the owner principal.
Definition: Node.php:115
This node represents a single notification.
Definition: INode.php:21
getNotificationType()
This method must return an xml element, using the Sabre classes.
Definition: Node.php:91
This interface reflects a single notification type.
__construct(CalDAV\Backend\NotificationSupport $caldavBackend, $principalUri, NotificationInterface $notification)
Constructor.
Definition: Node.php:53
ACL-enabled node.
Definition: IACL.php:16
notification()
Definition: notification.php:2
getETag()
Returns the etag for the notification.
Definition: Node.php:79