Вход Регистрация
Файл: phpbb/notification/method/base.php
Строк: 104
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/

namespace phpbbnotificationmethod;

/**
* Base notifications method class
*/
abstract class base implements phpbbnotificationmethodmethod_interface
{
    
/** @var phpbbnotificationmanager */
    
protected $notification_manager;

    
/** @var phpbbuser_loader */
    
protected $user_loader;

    
/** @var phpbbdbdriverdriver_interface */
    
protected $db;

    
/** @var phpbbcachedriverdriver_interface */
    
protected $cache;

    
/** @var phpbbtemplatetemplate */
    
protected $template;

    
/** @var phpbbextensionmanager */
    
protected $extension_manager;

    
/** @var phpbbuser */
    
protected $user;

    
/** @var phpbbauthauth */
    
protected $auth;

    
/** @var phpbbconfigconfig */
    
protected $config;

    
/** @var string */
    
protected $phpbb_root_path;

    
/** @var string */
    
protected $php_ext;

    
/**
    * Queue of messages to be sent
    *
    * @var array
    */
    
protected $queue = array();

    
/**
    * Notification Method Base Constructor
    * 
    * @param phpbbuser_loader $user_loader
    * @param phpbbdbdriverdriver_interface $db
    * @param phpbbcachedriverdriver_interface $cache
    * @param phpbbuser $user
    * @param phpbbauthauth $auth
    * @param phpbbconfigconfig $config
    * @param string $phpbb_root_path
    * @param string $php_ext
    * @return phpbbnotificationmethodbase
    */
    
public function __construct(phpbbuser_loader $user_loaderphpbbdbdriverdriver_interface $dbphpbbcachedriverdriver_interface $cache$userphpbbauthauth $authphpbbconfigconfig $config$phpbb_root_path$php_ext)
    {
        
$this->user_loader $user_loader;
        
$this->db $db;
        
$this->cache $cache;
        
$this->user $user;
        
$this->auth $auth;
        
$this->config $config;
        
$this->phpbb_root_path $phpbb_root_path;
        
$this->php_ext $php_ext;
    }

    
/**
    * Set notification manager (required)
    * 
    * @param phpbbnotificationmanager $notification_manager
    */
    
public function set_notification_manager(phpbbnotificationmanager $notification_manager)
    {
        
$this->notification_manager $notification_manager;
    }

    
/**
    * Add a notification to the queue
    *
    * @param phpbbnotificationtypetype_interface $notification
    */
    
public function add_to_queue(phpbbnotificationtypetype_interface $notification)
    {
        
$this->queue[] = $notification;
    }

    
/**
    * Empty the queue
    */
    
protected function empty_queue()
    {
        
$this->queue = array();
    }
}
Онлайн: 2
Реклама