aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-11-20 23:12:37 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2012-11-20 23:12:37 -0600
commit570c5ad3c08378f377385aaff7d3810ccb8db3ff (patch)
tree62b30a4d3cff0d82f4670f896e4d1a307f2cad69 /phpBB/includes
parent25d4809c9257f29902450c19e1a4eb248211a8ed (diff)
downloadforums-570c5ad3c08378f377385aaff7d3810ccb8db3ff.tar
forums-570c5ad3c08378f377385aaff7d3810ccb8db3ff.tar.gz
forums-570c5ad3c08378f377385aaff7d3810ccb8db3ff.tar.bz2
forums-570c5ad3c08378f377385aaff7d3810ccb8db3ff.tar.xz
forums-570c5ad3c08378f377385aaff7d3810ccb8db3ff.zip
[ticket/11103] Some comments
PHPBB3-11103
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/notification/manager.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/phpBB/includes/notification/manager.php b/phpBB/includes/notification/manager.php
index fbfe388c80..ea91496fb9 100644
--- a/phpBB/includes/notification/manager.php
+++ b/phpBB/includes/notification/manager.php
@@ -78,10 +78,15 @@ class phpbb_notification_manager
* order_dir Order direction (Default: DESC)
* limit Number of notifications to load (Default: 5)
* start Notifications offset (Default: 0)
- * all_unread Load all unread messages? If set to true, count_unread is set to true (Default: false)
- * count_unread Count all unread messages? (Default: false)
+ * all_unread Load all unread notifications? If set to true, count_unread is set to true (Default: false)
+ * count_unread Count all unread notifications? (Default: false)
+ * count_total Count all notifications? (Default: false)
+ * @return array Array of information based on the request with keys:
+ * 'notifications' array of notification type objects
+ * 'unread_count' number of unread notifications the user has if count_unread is true in the options
+ * 'total_count' number of notifications the user has if count_total is true in the options
*/
- public function load_notifications($options = array())
+ public function load_notifications(array $options = array())
{
// Merge default options
$options = array_merge(array(
@@ -297,8 +302,11 @@ class phpbb_notification_manager
* Note: If you send an array of types, any user who could receive multiple notifications from this single item will only receive
* a single notification. If they MUST receive multiple notifications, call this function multiple times instead of sending an array
* @param array $data Data specific for this type that will be inserted
+ * @param array $options Optional options to control what notifications are loaded
+ * ignore_users array of data to specify which users should not receive certain types of notifications
+ * @return array Information about what users were notified and how they were notified
*/
- public function add_notifications($item_type, $data, $options = array())
+ public function add_notifications($item_type, $data, array $options = array())
{
$options = array_merge(array(
'ignore_users' => array(),