From 01512104b5823d15eed64d362b41b9594f870f0c Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 22 Sep 2013 22:53:10 +0200 Subject: [feature/passwords] Use dependency injection for passwords driver helper The passwords driver helper is now injected into the driver base instead of being manually loaded. PHPBB3-11610 --- phpBB/phpbb/passwords/driver/base.php | 4 ++-- phpBB/phpbb/passwords/driver/helper.php | 11 ----------- 2 files changed, 2 insertions(+), 13 deletions(-) (limited to 'phpBB/phpbb/passwords/driver') diff --git a/phpBB/phpbb/passwords/driver/base.php b/phpBB/phpbb/passwords/driver/base.php index 67cbe4decf..2984dafef7 100644 --- a/phpBB/phpbb/passwords/driver/base.php +++ b/phpBB/phpbb/passwords/driver/base.php @@ -34,10 +34,10 @@ abstract class phpbb_passwords_driver_base implements phpbb_passwords_driver_int * * @return string Hash prefix */ - public function __construct(phpbb_config $config) + public function __construct(phpbb_config $config, phpbb_passwords_driver_helper $helper) { $this->config = $config; - $this->helper = new phpbb_passwords_driver_helper($this); + $this->helper = $helper; } /** diff --git a/phpBB/phpbb/passwords/driver/helper.php b/phpBB/phpbb/passwords/driver/helper.php index dcd07263d5..a50ac8819e 100644 --- a/phpBB/phpbb/passwords/driver/helper.php +++ b/phpBB/phpbb/passwords/driver/helper.php @@ -20,23 +20,12 @@ if (!defined('IN_PHPBB')) */ class phpbb_passwords_driver_helper { - /** @var phpbb_config */ - protected $driver; - /** * base64 alphabet * @var string */ public $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; - /** - * Constructor of passwords driver helper object - */ - public function __construct($driver) - { - $this->driver = $driver; - } - /** * Base64 encode hash * -- cgit v1.2.1