diff options
Diffstat (limited to 'phpBB/includes/notifications/method/base.php')
-rw-r--r-- | phpBB/includes/notifications/method/base.php | 51 |
1 files changed, 51 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'); + } +} |