diff options
author | s9e <s9e.dev@gmail.com> | 2015-02-04 23:07:58 +0100 |
---|---|---|
committer | JoshyPHP <s9e.dev@gmail.com> | 2015-04-02 19:16:01 +0200 |
commit | 72fb380c9fbb0d6fa51236bdc179ba7ef6126a5a (patch) | |
tree | 11faf4a7b94b8ba93ebc517d055df734437386fa /phpBB/phpbb/textformatter/s9e/parser.php | |
parent | e0bb446c57d692b3e968a7a3ccd9d726f0779391 (diff) | |
download | forums-72fb380c9fbb0d6fa51236bdc179ba7ef6126a5a.tar forums-72fb380c9fbb0d6fa51236bdc179ba7ef6126a5a.tar.gz forums-72fb380c9fbb0d6fa51236bdc179ba7ef6126a5a.tar.bz2 forums-72fb380c9fbb0d6fa51236bdc179ba7ef6126a5a.tar.xz forums-72fb380c9fbb0d6fa51236bdc179ba7ef6126a5a.zip |
[ticket/11768] Updated constructors with explicit dependencies
The trade-off is that an instance of phpbb\textformatter\s9e\factory and
phpbb\textformatter\data_access is created on any page that uses the
parser or the renderer, even when neither need to be regenerated. It has
no measureable impact on performance and costs ~20KB of RAM.
PHPBB3-11768
Diffstat (limited to 'phpBB/phpbb/textformatter/s9e/parser.php')
-rw-r--r-- | phpBB/phpbb/textformatter/s9e/parser.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php index 58cef8fa9e..d9f693ba18 100644 --- a/phpBB/phpbb/textformatter/s9e/parser.php +++ b/phpBB/phpbb/textformatter/s9e/parser.php @@ -39,17 +39,17 @@ class parser extends \phpbb\textformatter\parser * @param phpbb\cache\driver_interface $cache * @param string $key Cache key * @param phpbb\user $user - * @param ContainerInterface $container + * @param factory $factory * @return null */ - public function __construct(\phpbb\cache\driver\driver_interface $cache, $key, \phpbb\user $user, ContainerInterface $container) + public function __construct(\phpbb\cache\driver\driver_interface $cache, $key, \phpbb\user $user, factory $factory) { $this->user = $user; $parser = $cache->get($key); if (!$parser) { - list($parser) = $container->get('text_formatter.s9e.factory')->regenerate(); + list($parser) = $factory->regenerate(); } $this->parser = $parser; |