notifications = new Notifications(); $this->content = new Content(); $this->digest = new EmailDigests(); $this->preferences = new Preferences(); } /************************************************ * PREFERENCES ************************************************/ public function getUsersByFrequency(string $frequency):array { return $this->preferences->getUsersByFrequency($frequency); } public function getUserSubscriptions(int $userID, string $frequency):array { return $this->preferences->getUserSubscriptions($userID, $frequency); } public function addUserPreference(int $userID, int $item_id, string $item_type, string $frequency):bool { return $this->preferences->addUserPreference($userID, $item_id, $item_type, $frequency); } public function deleteUserPreference(int $userID, int $item_id, string $item_type):bool { return $this->preferences->deleteUserPreference($userID, $item_id, $item_type); } /************************************************ * NOTIFICATIONS ************************************************/ public function notify(int|array $user_ids, string $notification_type, int $fromUser = 0, array $args = []):bool { return $this->notifications->notify($user_ids, $notification_type, $fromUser, $args); } public function unnotify(int|array $user_ids, string $notification_type, int $fromUser = 0, array $args = []):bool { return $this->notifications->unnotify($user_ids, $notification_type, $fromUser, $args); } public function getUserNotifications(int $user_id, array $args = []):array { return $this->notifications->getUserNotifications($user_id, $args); } public function markRead(int $userID, int|array $notification_id):bool { return $this->notifications->markRead($userID, $notification_id); } public function markDismissed(int $userID, int|array $notification_id):bool { return $this->notifications->markDismissed($userID, $notification_id); } public function markActioned(int $userID, int|array $notification_id, array $result = []):bool { return $this->notifications->markActioned($userID, $notification_id, $result); } public function getNotificationTypes(bool $all = false):array { return $this->notifications->getNotificationTypes($all); } /************************************************ * CONTENT NOTIFICATIONS * These are pooled notifications of new content for: * - a particular artist * - a particular term ************************************************/ /************************************************ * EMAIL DIGESTS ************************************************/ }