[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

/phpbb/notification/method/ -> base.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * For full copyright and license information, please see
  10  * the docs/CREDITS.txt file.
  11  *
  12  */
  13  
  14  namespace phpbb\notification\method;
  15  
  16  /**
  17  * Base notifications method class
  18  */
  19  abstract class base implements \phpbb\notification\method\method_interface
  20  {
  21      /** @var \phpbb\notification\manager */
  22      protected $notification_manager;
  23  
  24      /** @var \phpbb\user_loader */
  25      protected $user_loader;
  26  
  27      /** @var \phpbb\db\driver\driver_interface */
  28      protected $db;
  29  
  30      /** @var \phpbb\cache\driver\driver_interface */
  31      protected $cache;
  32  
  33      /** @var \phpbb\template\template */
  34      protected $template;
  35  
  36      /** @var \phpbb\extension\manager */
  37      protected $extension_manager;
  38  
  39      /** @var \phpbb\user */
  40      protected $user;
  41  
  42      /** @var \phpbb\auth\auth */
  43      protected $auth;
  44  
  45      /** @var \phpbb\config\config */
  46      protected $config;
  47  
  48      /** @var string */
  49      protected $phpbb_root_path;
  50  
  51      /** @var string */
  52      protected $php_ext;
  53  
  54      /**
  55      * Queue of messages to be sent
  56      *
  57      * @var array
  58      */
  59      protected $queue = array();
  60  
  61      /**
  62      * Notification Method Base Constructor
  63      *
  64      * @param \phpbb\user_loader $user_loader
  65      * @param \phpbb\db\driver\driver_interface $db
  66      * @param \phpbb\cache\driver\driver_interface $cache
  67      * @param \phpbb\user $user
  68      * @param \phpbb\auth\auth $auth
  69      * @param \phpbb\config\config $config
  70      * @param string $phpbb_root_path
  71      * @param string $php_ext
  72      * @return \phpbb\notification\method\base
  73      */
  74  	public function __construct(\phpbb\user_loader $user_loader, \phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, $user, \phpbb\auth\auth $auth, \phpbb\config\config $config, $phpbb_root_path, $php_ext)
  75      {
  76          $this->user_loader = $user_loader;
  77          $this->db = $db;
  78          $this->cache = $cache;
  79          $this->user = $user;
  80          $this->auth = $auth;
  81          $this->config = $config;
  82          $this->phpbb_root_path = $phpbb_root_path;
  83          $this->php_ext = $php_ext;
  84      }
  85  
  86      /**
  87      * Set notification manager (required)
  88      *
  89      * @param \phpbb\notification\manager $notification_manager
  90      */
  91  	public function set_notification_manager(\phpbb\notification\manager $notification_manager)
  92      {
  93          $this->notification_manager = $notification_manager;
  94      }
  95  
  96      /**
  97      * Add a notification to the queue
  98      *
  99      * @param \phpbb\notification\type\type_interface $notification
 100      */
 101  	public function add_to_queue(\phpbb\notification\type\type_interface $notification)
 102      {
 103          $this->queue[] = $notification;
 104      }
 105  
 106      /**
 107      * Empty the queue
 108      */
 109  	protected function empty_queue()
 110      {
 111          $this->queue = array();
 112      }
 113  }


Generated: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1