1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-14 04:34:07 +02:00

[ticket/11481] Use container for all classes and inject dependencies

PHPBB3-11481
This commit is contained in:
Joas Schilling
2013-06-06 20:04:23 +02:00
parent b5f1484744
commit 3efe0eb246
9 changed files with 139 additions and 34 deletions

View File

@@ -22,6 +22,12 @@ if (!defined('IN_PHPBB'))
*/
abstract class phpbb_feed_base
{
/**
* Feed helper object
* @var phpbb_feed_helper
*/
protected $helper;
/**
* SQL Query to be executed to get feed items
*/
@@ -49,8 +55,11 @@ abstract class phpbb_feed_base
/**
* Constructor
*
* @param phpbb_feed_helper $helper Feed helper
* @return null
*/
function __construct()
function __construct(phpbb_feed_helper $helper)
{
global $config;
@@ -67,6 +76,8 @@ abstract class phpbb_feed_base
$this->num_items = 10;
}
}
$this->helper = $helper;
}
/**
@@ -225,6 +236,6 @@ abstract class phpbb_feed_base
return $user->lang['GUEST'];
}
return '<a href="' . feed_append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $author_id) . '">' . $row[$this->get('creator')] . '</a>';
return '<a href="' . $this->helper->append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $author_id) . '">' . $row[$this->get('creator')] . '</a>';
}
}