diff options
| author | Igor Wiedler <igor@wiedler.ch> | 2012-04-08 16:40:19 +0200 |
|---|---|---|
| committer | Igor Wiedler <igor@wiedler.ch> | 2012-04-08 16:40:19 +0200 |
| commit | 81fb4268cd141259fe5b3bc9ad51adf2e29e0772 (patch) | |
| tree | b7853d742aeb04980f6de619560db3e9667245e8 /phpBB/includes/avatar/driver/driver.php | |
| parent | eea2ec50521e274b928d23f710108f37797cb22c (diff) | |
| download | forums-81fb4268cd141259fe5b3bc9ad51adf2e29e0772.tar forums-81fb4268cd141259fe5b3bc9ad51adf2e29e0772.tar.gz forums-81fb4268cd141259fe5b3bc9ad51adf2e29e0772.tar.bz2 forums-81fb4268cd141259fe5b3bc9ad51adf2e29e0772.tar.xz forums-81fb4268cd141259fe5b3bc9ad51adf2e29e0772.zip | |
[feature/avatars] Introduce an avatar driver interface
PHPBB3-10018
Diffstat (limited to 'phpBB/includes/avatar/driver/driver.php')
| -rw-r--r-- | phpBB/includes/avatar/driver/driver.php | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/phpBB/includes/avatar/driver/driver.php b/phpBB/includes/avatar/driver/driver.php index 8fb80693fb..277130e819 100644 --- a/phpBB/includes/avatar/driver/driver.php +++ b/phpBB/includes/avatar/driver/driver.php @@ -19,7 +19,7 @@ if (!defined('IN_PHPBB')) * Base class for avatar drivers * @package avatars */ -abstract class phpbb_avatar_driver +abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface { /** * Current board configuration @@ -52,12 +52,6 @@ abstract class phpbb_avatar_driver protected $cache; /** - * @TODO - */ - const FROM_USER = 0; - const FROM_GROUP = 1; - - /** * This flag should be set to true if the avatar requires a nonstandard image * tag, and will generate the html itself. * @type boolean @@ -83,12 +77,7 @@ abstract class phpbb_avatar_driver } /** - * Get the avatar url and dimensions - * - * @param $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 array Avatar data + * @inheritdoc */ public function get_data($row, $ignore_config = false) { @@ -100,13 +89,7 @@ abstract class phpbb_avatar_driver } /** - * 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 - * and board configuration configuration option, or should just render - * the avatar anyways. Useful for the ACP. - * @return string HTML + * @inheritdoc */ public function get_custom_html($row, $ignore_config = false) { @@ -114,7 +97,7 @@ abstract class phpbb_avatar_driver } /** - * @TODO + * @inheritdoc **/ public function prepare_form($template, $row, &$error, &$override_focus) { @@ -122,7 +105,7 @@ abstract class phpbb_avatar_driver } /** - * @TODO + * @inheritdoc **/ public function process_form($template, $row, &$error) { @@ -130,7 +113,7 @@ abstract class phpbb_avatar_driver } /** - * @TODO + * @inheritdoc **/ public function delete($row) { @@ -138,18 +121,18 @@ abstract class phpbb_avatar_driver } /** - * @TODO + * @inheritdoc **/ - public static function clean_row($row, $src = phpbb_avatar_driver::FROM_USER) + public static function clean_row($row, $src = phpbb_avatar_driver_interface::FROM_USER) { $return = array(); $prefix = false; - - if ($src == phpbb_avatar_driver::FROM_USER) + + if ($src == phpbb_avatar_driver_interface::FROM_USER) { $prefix = 'user_'; } - else if ($src == phpbb_avatar_driver::FROM_GROUP) + else if ($src == phpbb_avatar_driver_interface::FROM_GROUP) { $prefix = 'group_'; } |
