caldavBackend = $caldavBackend; $this->principalUri = $principalUri; } /** * Returns all notifications for a principal. * * @return array */ public function getChildren() { $children = []; $notifications = $this->caldavBackend->getNotificationsForPrincipal($this->principalUri); foreach ($notifications as $notification) { $children[] = new Node( $this->caldavBackend, $this->principalUri, $notification ); } return $children; } /** * Returns the name of this object. * * @return string */ public function getName() { return 'notifications'; } /** * Returns the owner principal. * * This must be a url to a principal, or null if there's no owner * * @return string|null */ public function getOwner() { return $this->principalUri; } }