mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 02:06:32 +02:00
[feature/avatars] Even more fixes to docblocks
PHPBB3-10018
This commit is contained in:
@@ -21,53 +21,57 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
{
|
||||
/**
|
||||
* Avatar driver name
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* Current board configuration
|
||||
* @type phpbb_config
|
||||
* @var phpbb_config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* Request object
|
||||
* @type phpbb_request
|
||||
* @var phpbb_request
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Current $phpbb_root_path
|
||||
* @type string
|
||||
* @var string
|
||||
*/
|
||||
protected $phpbb_root_path;
|
||||
|
||||
/**
|
||||
* Current $php_ext
|
||||
* @type string
|
||||
* @var string
|
||||
*/
|
||||
protected $php_ext;
|
||||
|
||||
/**
|
||||
* A cache driver
|
||||
* @type phpbb_cache_driver_interface
|
||||
* Cache driver
|
||||
* @var phpbb_cache_driver_interface
|
||||
*/
|
||||
protected $cache;
|
||||
|
||||
/**
|
||||
* This flag should be set to true if the avatar requires a nonstandard image
|
||||
* tag, and will generate the html itself.
|
||||
* @type boolean
|
||||
* @var boolean
|
||||
*/
|
||||
public $custom_html = false;
|
||||
|
||||
/**
|
||||
* Construct a driver object
|
||||
*
|
||||
* @param phpbb_config $config The phpBB configuration
|
||||
* @param phpbb_request $request The request object
|
||||
* @param string $phpbb_root_path The path to the phpBB root
|
||||
* @param string $php_ext The php file extension
|
||||
* @param phpbb_cache_driver_interface $cache A cache driver
|
||||
* @param phpbb_config $config phpBB configuration
|
||||
* @param phpbb_request $request Request object
|
||||
* @param string $phpbb_root_path Path to the phpBB root
|
||||
* @param string $php_ext PHP file extension
|
||||
* @param phpbb_cache_driver_interface $cache Cache driver
|
||||
*/
|
||||
public function __construct(phpbb_config $config, phpbb_request $request, $phpbb_root_path, $php_ext, phpbb_cache_driver_interface $cache = null)
|
||||
{
|
||||
@@ -100,7 +104,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
*/
|
||||
public function prepare_form($template, $row, &$error)
|
||||
{
|
||||
return false;
|
||||
@@ -108,7 +112,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
*/
|
||||
public function prepare_form_acp()
|
||||
{
|
||||
return array();
|
||||
@@ -116,7 +120,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
*/
|
||||
public function process_form($template, $row, &$error)
|
||||
{
|
||||
return false;
|
||||
@@ -124,7 +128,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
*/
|
||||
public function delete($row)
|
||||
{
|
||||
return true;
|
||||
@@ -132,7 +136,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
*/
|
||||
public function is_enabled()
|
||||
{
|
||||
$driver = preg_replace('#^phpbb_avatar_driver_#', '', get_class($this));
|
||||
@@ -142,7 +146,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
*/
|
||||
public function get_template_name()
|
||||
{
|
||||
$driver = preg_replace('#^phpbb_avatar_driver_#', '', get_class($this));
|
||||
@@ -162,7 +166,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
/**
|
||||
* Sets the name of the driver.
|
||||
*
|
||||
* @param string $name The driver name
|
||||
* @param string $name Driver name
|
||||
*/
|
||||
public function set_name($name)
|
||||
{
|
||||
|
@@ -78,7 +78,7 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
*/
|
||||
public function prepare_form_acp()
|
||||
{
|
||||
return array(
|
||||
@@ -170,7 +170,7 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
|
||||
/**
|
||||
* Build gravatar URL for output on page
|
||||
*
|
||||
* @return string The gravatar URL
|
||||
* @return string Gravatar URL
|
||||
*/
|
||||
protected function get_gravatar_url($row)
|
||||
{
|
||||
|
@@ -24,7 +24,7 @@ interface phpbb_avatar_driver_interface
|
||||
/**
|
||||
* Returns the name of the driver.
|
||||
*
|
||||
* @return string Name of wrapped driver.
|
||||
* @return string Name of wrapped driver.
|
||||
*/
|
||||
public function get_name();
|
||||
|
||||
@@ -43,7 +43,7 @@ interface phpbb_avatar_driver_interface
|
||||
* Returns custom html for displaying this avatar.
|
||||
* Only called if $custom_html is true.
|
||||
*
|
||||
* @param $ignore_config Whether this function should respect the users prefs
|
||||
* @param bool $ignore_config Whether this function should respect the users prefs
|
||||
* and board configuration configuration option, or should just render
|
||||
* the avatar anyways. Useful for the ACP.
|
||||
* @return string HTML
|
||||
@@ -53,56 +53,56 @@ interface phpbb_avatar_driver_interface
|
||||
/**
|
||||
* Prepare form for changing the settings of this avatar
|
||||
*
|
||||
* @param object $template The template object
|
||||
* @param array $row The user data or group data that has been cleaned with
|
||||
* @param object $template Template object
|
||||
* @param array $row User data or group data that has been cleaned with
|
||||
* phpbb_avatar_manager::clean_row
|
||||
* @param array &$error The reference to an error array
|
||||
* @param array &$error Reference to an error array
|
||||
*
|
||||
* @return bool Returns true if form has been successfully prepared
|
||||
**/
|
||||
* @return bool True if form has been successfully prepared
|
||||
*/
|
||||
public function prepare_form($template, $row, &$error);
|
||||
|
||||
/**
|
||||
* Prepare form for changing the acp settings of this avatar
|
||||
*
|
||||
* @return array Return the array containing the acp settings
|
||||
**/
|
||||
* @return array Array containing the acp settings
|
||||
*/
|
||||
public function prepare_form_acp();
|
||||
|
||||
/**
|
||||
* Process form data
|
||||
*
|
||||
* @param object $template The template object
|
||||
* @param array $row The user data or group data that has been cleaned with
|
||||
* @param object $template Template object
|
||||
* @param array $row User data or group data that has been cleaned with
|
||||
* phpbb_avatar_manager::clean_row
|
||||
* @param array &$error The reference to an error array
|
||||
* @param array &$error Reference to an error array
|
||||
*
|
||||
* @return array An array containing the avatar data as follows:
|
||||
* @return array Array containing the avatar data as follows:
|
||||
* ['avatar'], ['avatar_width'], ['avatar_height']
|
||||
**/
|
||||
*/
|
||||
public function process_form($template, $row, &$error);
|
||||
|
||||
/**
|
||||
* Delete avatar
|
||||
*
|
||||
* @param array $row The user data or group data that has been cleaned with
|
||||
* @param array $row User data or group data that has been cleaned with
|
||||
* phpbb_avatar_manager::clean_row
|
||||
*
|
||||
* @return bool True if avatar has been deleted or there is no need to delete
|
||||
**/
|
||||
*/
|
||||
public function delete($row);
|
||||
|
||||
/**
|
||||
* Check if avatar is enabled
|
||||
*
|
||||
* @return bool True if avatar is enabled, false if it's disabled
|
||||
**/
|
||||
*/
|
||||
public function is_enabled();
|
||||
|
||||
/**
|
||||
* Get the avatars template name
|
||||
*
|
||||
* @return string The avatars template name
|
||||
**/
|
||||
* @return string Avatar's template name
|
||||
*/
|
||||
public function get_template_name();
|
||||
}
|
||||
|
@@ -114,7 +114,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
*/
|
||||
public function prepare_form_acp()
|
||||
{
|
||||
return array(
|
||||
@@ -148,7 +148,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
|
||||
/**
|
||||
* Get a list of avatars that are locally available
|
||||
*
|
||||
* @return array An array containing the locally available avatars
|
||||
* @return array Array containing the locally available avatars
|
||||
*/
|
||||
protected function get_avatar_list()
|
||||
{
|
||||
|
@@ -60,7 +60,7 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
*/
|
||||
public function prepare_form_acp()
|
||||
{
|
||||
return array(
|
||||
|
@@ -124,7 +124,7 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
*/
|
||||
public function prepare_form_acp()
|
||||
{
|
||||
global $user;
|
||||
|
Reference in New Issue
Block a user