]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/lib/Sabre/CalDAV/Notifications/Node.php
Merge branch '3.6-rc'
[friendica-addons.git] / dav / SabreDAV / lib / Sabre / CalDAV / Notifications / Node.php
1 <?php
2
3 /**
4  * This node represents a single notification.
5  *
6  * The signature is mostly identical to that of Sabre_DAV_IFile, but the get() method 
7  * MUST return an xml document that matches the requirements of the 
8  * 'caldav-notifications.txt' spec.
9
10  * @package Sabre
11  * @subpackage CalDAV
12  * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
13  * @author Evert Pot (http://www.rooftopsolutions.nl/) 
14  * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
15  */
16 class Sabre_CalDAV_Notifications_Node extends Sabre_DAV_Node implements Sabre_CalDAV_Notifications_INode {
17
18     /**
19      * The notification backend
20      * 
21      * @var Sabre_CalDAV_Backend_NotificationSupport
22      */
23     protected $caldavBackend;
24
25     /**
26      * The actual notification
27      * 
28      * @var Sabre_CalDAV_Notifications_INotificationType 
29      */
30     protected $notification;
31         
32     /**
33      * Constructor
34      *
35      * @param Sabre_CalDAV_Backend_NotificationSupport $caldavBackend
36      * @param Sabre_CalDAV_Notifications_INotificationType $notification
37      */
38     public function __construct(Sabre_CalDAV_Backend_NotificationSupport $caldavBackend, Sabre_CalDAV_Notifications_INotificationType $notification) {        
39
40         $this->caldavBackend = $caldavBackend;
41         $this->notification = $notification;
42
43     }
44
45     /**
46      * Returns the path name for this notification
47      * 
48      * @return id 
49      */
50     public function getName() {
51
52         return $this->notification->getId();
53
54     }
55
56     /**
57      * This method must return an xml element, using the 
58      * Sabre_CalDAV_Notifications_INotificationType classes.
59      * 
60      * @return Sabre_DAVNotification_INotificationType
61      */
62     public function getNotificationType() {
63
64         return $this->notification;
65
66     }
67
68 }