aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/avatar/driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/avatar/driver.php')
-rw-r--r--phpBB/includes/avatar/driver.php32
1 files changed, 22 insertions, 10 deletions
diff --git a/phpBB/includes/avatar/driver.php b/phpBB/includes/avatar/driver.php
index 016f9e94a8..60ec18670e 100644
--- a/phpBB/includes/avatar/driver.php
+++ b/phpBB/includes/avatar/driver.php
@@ -2,7 +2,7 @@
/**
*
* @package avatar
-* @copyright (c) 2005, 2009 phpBB Group
+* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
@@ -37,7 +37,13 @@ abstract class phpbb_avatar_driver
* Current $phpEx
* @type string
*/
- protected $php_ext;
+ protected $phpEx;
+
+ /**
+ * A cache driver
+ * @type phpbb_cache_driver_interface
+ */
+ protected $cache;
/**
* This flag should be set to true if the avatar requires a nonstandard image
@@ -47,22 +53,27 @@ abstract class phpbb_avatar_driver
public $custom_html = false;
/**
- * Construct an avatar object
+ * Construct an driver object
*
- * @param $user_row User data to base the avatar url/html on
+ * @param $config The phpBB configuration
+ * @param $phpbb_root_path The path to the phpBB root
+ * @param $phpEx The php file extension
+ * @param $cache A cache driver
*/
- public function __construct(phpbb_config $config, $phpbb_root_path, $php_ext)
+ public function __construct(phpbb_config $config, $phpbb_root_path, $phpEx, phpbb_cache_driver_interface $cache = null)
{
$this->config = $config;
$this->phpbb_root_path = $phpbb_root_path;
- $this->php_ext = $php_ext;
+ $this->phpEx = $phpEx;
+ $this->cache = $cache;
}
/**
* Get the avatar url and dimensions
*
- * @param $ignore_config Whether $user or global avatar visibility settings
- * should be ignored
+ * @param $ignore_config Whether this function should respect the users/board
+ * configuration option, or should just render the avatar anyways.
+ * Useful for the ACP.
* @return array Avatar data
*/
public function get_data($user_row, $ignore_config = false)
@@ -78,8 +89,9 @@ abstract class phpbb_avatar_driver
* Returns custom html for displaying this avatar.
* Only called if $custom_html is true.
*
- * @param $ignore_config Whether $user or global avatar visibility settings
- * should be ignored
+ * @param $ignore_config Whether this function should respect the users/board
+ * configuration option, or should just render the avatar anyways.
+ * Useful for the ACP.
* @return string HTML
*/
public function get_custom_html($user_row, $ignore_config = false)