ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\CalDAV\Notifications\Collection Class Reference

This node represents a list of notifications. More...

+ Inheritance diagram for Sabre\CalDAV\Notifications\Collection:
+ Collaboration diagram for Sabre\CalDAV\Notifications\Collection:

Public Member Functions

 __construct (CalDAV\Backend\NotificationSupport $caldavBackend, $principalUri)
 Constructor. More...
 
 getChildren ()
 Returns all notifications for a principal. More...
 
 getName ()
 Returns the name of this object. More...
 
 getOwner ()
 Returns the owner principal. More...
 
- Public Member Functions inherited from Sabre\DAV\Collection
 getChild ($name)
 Returns a child object, by its name. More...
 
 childExists ($name)
 Checks is a child-node exists. More...
 
 createFile ($name, $data=null)
 Creates a new file in the directory. More...
 
 createDirectory ($name)
 Creates a new subdirectory. More...
 
- Public Member Functions inherited from Sabre\DAV\Node
 getLastModified ()
 Returns the last modification time as a unix timestamp. More...
 
 delete ()
 Deletes the current node. More...
 
 setName ($name)
 Renames the node. More...
 
- Public Member Functions inherited from Sabre\DAVACL\IACL
 getGroup ()
 Returns a group principal. More...
 
 getACL ()
 Returns a list of ACE's for this node. More...
 
 setACL (array $acl)
 Updates the ACL. More...
 
 getSupportedPrivilegeSet ()
 Returns the list of supported privileges for this node. More...
 

Protected Attributes

 $caldavBackend
 
 $principalUri
 

Detailed Description

This node represents a list of notifications.

It provides no additional functionality, but you must implement this interface to allow the Notifications plugin to mark the collection as a notifications collection.

This collection should only return Sabre nodes as its children.

Author
Evert Pot (http://evertpot.com/) http://sabre.io/license/ Modified BSD License

Definition at line 23 of file Collection.php.

Constructor & Destructor Documentation

◆ __construct()

Sabre\CalDAV\Notifications\Collection::__construct ( CalDAV\Backend\NotificationSupport  $caldavBackend,
  $principalUri 
)

Constructor.

Parameters
CalDAV\Backend\NotificationSupport$caldavBackend
string$principalUri

Definition at line 47 of file Collection.php.

References Sabre\CalDAV\Notifications\Collection\$caldavBackend, and Sabre\CalDAV\Notifications\Collection\$principalUri.

47  {
48 
49  $this->caldavBackend = $caldavBackend;
50  $this->principalUri = $principalUri;
51 
52  }

Member Function Documentation

◆ getChildren()

Sabre\CalDAV\Notifications\Collection::getChildren ( )

Returns all notifications for a principal.

Returns
array

Implements Sabre\DAV\ICollection.

Definition at line 59 of file Collection.php.

59  {
60 
61  $children = [];
62  $notifications = $this->caldavBackend->getNotificationsForPrincipal($this->principalUri);
63 
64  foreach ($notifications as $notification) {
65 
66  $children[] = new Node(
67  $this->caldavBackend,
68  $this->principalUri,
69  $notification
70  );
71  }
72 
73  return $children;
74 
75  }

◆ getName()

Sabre\CalDAV\Notifications\Collection::getName ( )

Returns the name of this object.

Returns
string

Implements Sabre\DAV\INode.

Definition at line 82 of file Collection.php.

82  {
83 
84  return 'notifications';
85 
86  }

◆ getOwner()

Sabre\CalDAV\Notifications\Collection::getOwner ( )

Returns the owner principal.

This must be a url to a principal, or null if there's no owner

Returns
string|null

Implements Sabre\DAVACL\IACL.

Definition at line 95 of file Collection.php.

References Sabre\CalDAV\Notifications\Collection\$principalUri.

95  {
96 
97  return $this->principalUri;
98 
99  }

Field Documentation

◆ $caldavBackend

Sabre\CalDAV\Notifications\Collection::$caldavBackend
protected

Definition at line 32 of file Collection.php.

Referenced by Sabre\CalDAV\Notifications\Collection\__construct().

◆ $principalUri

Sabre\CalDAV\Notifications\Collection::$principalUri
protected

The documentation for this class was generated from the following file: