aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/notifications/method
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-09-08 10:49:58 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2012-09-08 10:49:58 -0500
commitb887fcc3d180860e3b7fdcb2a70e2cd8a519bea2 (patch)
tree68529c531b34b9626bbb4a79b74462efd5fc9036 /phpBB/includes/notifications/method
parent7bf598954c452448c2807428f6517cd75d910f92 (diff)
downloadforums-b887fcc3d180860e3b7fdcb2a70e2cd8a519bea2.tar
forums-b887fcc3d180860e3b7fdcb2a70e2cd8a519bea2.tar.gz
forums-b887fcc3d180860e3b7fdcb2a70e2cd8a519bea2.tar.bz2
forums-b887fcc3d180860e3b7fdcb2a70e2cd8a519bea2.tar.xz
forums-b887fcc3d180860e3b7fdcb2a70e2cd8a519bea2.zip
[ticket/11103] The start of an all-encompassing notifications system
This system will take input from various systems to store notifications and send notifications to users all in one nice extendable system. This system should act something like the notifications system on other social networking sites (in that, there is a single location where a user can see all of their notifications for various events). PHPBB3-11103
Diffstat (limited to 'phpBB/includes/notifications/method')
-rw-r--r--phpBB/includes/notifications/method/base.php51
-rw-r--r--phpBB/includes/notifications/method/email.php28
-rw-r--r--phpBB/includes/notifications/method/interface.php24
3 files changed, 103 insertions, 0 deletions
diff --git a/phpBB/includes/notifications/method/base.php b/phpBB/includes/notifications/method/base.php
new file mode 100644
index 0000000000..a70f37db95
--- /dev/null
+++ b/phpBB/includes/notifications/method/base.php
@@ -0,0 +1,51 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Base notifications method class
+* @package notifications
+*/
+abstract class phpbb_notifications_method_base implements phpbb_notifications_method_interface
+{
+ protected $phpbb_container;
+ protected $db;
+ protected $user;
+
+ /**
+ * notification_id
+ * item_type
+ * item_id
+ *
+ * by_user_id (one who caused the notification)
+ * user_id
+ * time
+ * unread
+ *
+ * data (special serialized field that each notification type can use to store stuff)
+ */
+ protected $data = array();
+
+ public function __construct(Symfony\Component\DependencyInjection\ContainerBuilder $phpbb_container, $data = array())
+ {
+ // phpBB Container
+ $this->phpbb_container = $phpbb_container;
+
+ // Some common things we're going to use
+ $this->db = $phpbb_container->get('dbal.conn');
+ $this->user = $phpbb_container->get('user');
+ }
+}
diff --git a/phpBB/includes/notifications/method/email.php b/phpBB/includes/notifications/method/email.php
new file mode 100644
index 0000000000..b06e2c018e
--- /dev/null
+++ b/phpBB/includes/notifications/method/email.php
@@ -0,0 +1,28 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Email notification method class
+* @package notifications
+*/
+class phpbb_notifications_method_email extends phpbb_notifications_method_base
+{
+ function notify()
+ {
+ // email the user
+ }
+}
diff --git a/phpBB/includes/notifications/method/interface.php b/phpBB/includes/notifications/method/interface.php
new file mode 100644
index 0000000000..2d8a8b605e
--- /dev/null
+++ b/phpBB/includes/notifications/method/interface.php
@@ -0,0 +1,24 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Base notifications method interface
+* @package notifications
+*/
+interface phpbb_notifications_method_interface
+{
+}