Campustream 1.0
A social network MQP for WPI
|
Public Member Functions | |
__construct ($user=false) | |
get ($type, $min=5) | |
send ($to_user, $type, $msg, $link_id) | |
markAllAsRead () | |
markAsRead ($type) | |
numUnread ($type=false) | |
Static Public Member Functions | |
static | load () |
Data Fields | |
$read |
Campustream's notification system, backed by Redis
Definition at line 6 of file notifications.php.
__construct | ( | $ | user = false | ) |
Create a new notifications class and store a connection to Redis for later use.
Definition at line 35 of file notifications.php.
get | ( | $ | type, |
$ | min = 5 |
||
) |
Retrieve a certain category of notifications.
$type | The category to retrieve |
$min | The minimum number of notifications to return |
Definition at line 53 of file notifications.php.
static load | ( | ) | [static] |
Return a singleton instance of this class
Definition at line 23 of file notifications.php.
markAllAsRead | ( | ) |
Mark all notifications as read
Definition at line 97 of file notifications.php.
markAsRead | ( | $ | type | ) |
Mark all notifications of a certain type as read
$type | The category of notifications |
Definition at line 113 of file notifications.php.
numUnread | ( | $ | type = false | ) |
Retrieve the number of unread notifications, either in a certain category, or across all categories.
Definition at line 136 of file notifications.php.
send | ( | $ | to_user, |
$ | type, | ||
$ | msg, | ||
$ | link_id | ||
) |
Send a notification to the given user.
$to_user | The user to send the notification to |
$type | The category of notification |
$msg | The notification message |
$link_id | The ID that will be used to link the user to the post |
Definition at line 81 of file notifications.php.
$read |
Definition at line 8 of file notifications.php.