1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/11103] Create user loader class, update for DIC

Create a very basic user loader class to handle querying/storing
user data in a centralized location.

Use DIC collection service for notification types/methods.

Cleanup unused dependencies.

Fix some other issues.

PHPBB3-11103
This commit is contained in:
Nathan Guse
2012-11-20 18:14:48 -06:00
parent d2187424da
commit 2afb8b9df8
30 changed files with 518 additions and 325 deletions

View File

@@ -24,6 +24,9 @@ abstract class phpbb_notification_method_base implements phpbb_notification_meth
/** @var phpbb_notification_manager */
protected $notification_manager = null;
/** @var phpbb_user_loader */
protected $user_loader = null;
/** @var dbal */
protected $db = null;
@@ -58,13 +61,11 @@ abstract class phpbb_notification_method_base implements phpbb_notification_meth
*/
protected $queue = array();
public function __construct(phpbb_notification_manager $notification_manager, dbal $db, phpbb_cache_driver_interface $cache, phpbb_template $template, phpbb_extension_manager $extension_manager, $user, phpbb_auth $auth, phpbb_config $config, $phpbb_root_path, $php_ext)
public function __construct(phpbb_user_loader $user_loader, dbal $db, phpbb_cache_driver_interface $cache, $user, phpbb_auth $auth, phpbb_config $config, $phpbb_root_path, $php_ext)
{
$this->notification_manager = $notification_manager;
$this->user_loader = $user_loader;
$this->db = $db;
$this->cache = $cache;
$this->template = $template;
$this->extension_manager = $extension_manager;
$this->user = $user;
$this->auth = $auth;
$this->config = $config;
@@ -72,6 +73,11 @@ abstract class phpbb_notification_method_base implements phpbb_notification_meth
$this->php_ext = $php_ext;
}
public function set_notification_manager(phpbb_notification_manager $notification_manager)
{
$this->notification_manager = $notification_manager;
}
/**
* Add a notification to the queue
*