diff options
Diffstat (limited to 'phpBB/includes/notifications/method')
-rw-r--r-- | phpBB/includes/notifications/method/base.php | 51 | ||||
-rw-r--r-- | phpBB/includes/notifications/method/email.php | 28 | ||||
-rw-r--r-- | phpBB/includes/notifications/method/interface.php | 24 |
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 +{ +} |