aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/avatar/manager.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2012-11-19 00:30:18 +0100
committerMarc Alexander <admin@m-a-styles.de>2012-11-19 00:30:18 +0100
commit8d0c667dcec08fb506dcf19203ded3c699339d6e (patch)
tree94a9469a7145a1a2743d2426df385409fa467d2d /phpBB/includes/avatar/manager.php
parentbea6e845d3c0c25f5f84ad13fcf22f42f1249561 (diff)
downloadforums-8d0c667dcec08fb506dcf19203ded3c699339d6e.tar
forums-8d0c667dcec08fb506dcf19203ded3c699339d6e.tar.gz
forums-8d0c667dcec08fb506dcf19203ded3c699339d6e.tar.bz2
forums-8d0c667dcec08fb506dcf19203ded3c699339d6e.tar.xz
forums-8d0c667dcec08fb506dcf19203ded3c699339d6e.zip
[feature/avatars] Fix the docs and small naming fixes
PHPBB3-10018
Diffstat (limited to 'phpBB/includes/avatar/manager.php')
-rw-r--r--phpBB/includes/avatar/manager.php38
1 files changed, 29 insertions, 9 deletions
diff --git a/phpBB/includes/avatar/manager.php b/phpBB/includes/avatar/manager.php
index 546cdcdc05..7c7bd6c7ba 100644
--- a/phpBB/includes/avatar/manager.php
+++ b/phpBB/includes/avatar/manager.php
@@ -26,25 +26,37 @@ class phpbb_avatar_manager
private $request;
private $cache;
private static $valid_drivers = false;
- private $tasks;
+ private $avatar_drivers;
private $container;
/**
- * @TODO
+ * Construct an avatar manager object
+ *
+ * @param $phpbb_root_path The path to the phpBB root
+ * @param $phpEx The php file extension
+ * @param $config The phpBB configuration
+ * @param $request The request object
+ * @param $cache A cache driver
+ * @param $avatar_drivers The avatars drivers passed via the service container
+ * @param $container The container object
**/
- public function __construct($phpbb_root_path, $phpEx, phpbb_config $config, phpbb_request $request, phpbb_cache_driver_interface $cache, $tasks, $container)
+ public function __construct($phpbb_root_path, $phpEx, phpbb_config $config, phpbb_request $request, phpbb_cache_driver_interface $cache, $avatar_drivers, $container)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx;
$this->config = $config;
$this->request = $request;
$this->cache = $cache;
- $this->tasks = $tasks;
+ $this->avatar_drivers = $avatar_drivers;
$this->container = $container;
}
/**
- * @TODO
+ * Get the driver object specified by the avatar type
+ *
+ * @param string The avatar type; by default an avatar's service container name
+ *
+ * @return object The avatar driver object
**/
public function get_driver($avatar_type)
{
@@ -87,14 +99,15 @@ class phpbb_avatar_manager
}
/**
- * @TODO
+ * Load the list of valid drivers
+ * This is executed once and fills self::$valid_drivers
**/
private function load_valid_drivers()
{
- if (!empty($this->tasks))
+ if (!empty($this->avatar_drivers))
{
self::$valid_drivers = array();
- foreach ($this->tasks as $driver)
+ foreach ($this->avatar_drivers as $driver)
{
self::$valid_drivers[] = $driver->get_name();
}
@@ -102,7 +115,9 @@ class phpbb_avatar_manager
}
/**
- * @TODO
+ * Get a list of valid avatar drivers
+ *
+ * @return array An array containing a list of the valid avatar drivers
**/
public function get_valid_drivers()
{
@@ -116,6 +131,11 @@ class phpbb_avatar_manager
/**
* Strip out user_ and group_ prefixes from keys
+ *
+ * @param array $row The user data or group data
+ *
+ * @return array The user data or group data with keys that have been
+ * stripped from the preceding "user_" or "group_"
**/
public static function clean_row($row)
{