diff options
| author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-07-23 11:13:25 -0500 | 
|---|---|---|
| committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-07-23 11:13:25 -0500 | 
| commit | 485c6ab3553f518b157610ee1144bbcbef63f797 (patch) | |
| tree | 0c50392c4716511e118eeabd3f48cceb3ac7e906 /phpBB/phpbb/avatar/driver/interface.php | |
| parent | 41d8bfa974900c9befbde06cc08060eb8a552ec8 (diff) | |
| parent | be59885d5fd4b44f1c43994dec928eda816f9ab8 (diff) | |
| download | forums-485c6ab3553f518b157610ee1144bbcbef63f797.tar forums-485c6ab3553f518b157610ee1144bbcbef63f797.tar.gz forums-485c6ab3553f518b157610ee1144bbcbef63f797.tar.bz2 forums-485c6ab3553f518b157610ee1144bbcbef63f797.tar.xz forums-485c6ab3553f518b157610ee1144bbcbef63f797.zip | |
Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11667
# By Joas Schilling (224) and others
# Via Andreas Fischer (23) and others
* 'develop' of github.com:phpbb/phpbb3: (385 commits)
  [ticket/11734] Readd accidently removed language strings of forum permissions
  [ticket/11620] Whitespace and combine function into test_case
  [ticket/11620] Move check_ban_test functions to setUp/tearDown for clarity
  [ticket/11620] Changed incorrect global variable
  [ticket/11620] Minor indentation changes and comment clarity
  [ticket/11733] Fix "Illegal offset type" Warning caused by overall feed
  [ticket/11733] Add browse test for feed.php
  [ticket/11731] Remove static calls to captcha garbage collector
  [ticket/11728] Replace topic_approved with topic_visibility
  [ticket/11620] Expected and actual test conditions wrongly swapped
  [ticket/11620] Space between . in directory import concatenation
  [ticket/11620] Changes to match merge
  [ticket/11620] Changes for code guidelines consistency
  [ticket/11620] Fix a static calls to non-static for session captcha
  [ticket/11620] Cleanup creation_test that was renamed on a cherry-pick
  [ticket/11620] Update auth_provider for new interface
  [ticket/11620] Added garbage_collection_test
  [ticket/11620] Fixed check_ban_test errors with cache and ban warning message
  [ticket/11620] Fixed a typo on check_ban_test
  [ticket/11620]  Refactored check_isvalid_test to use session_test_case
  ...
Diffstat (limited to 'phpBB/phpbb/avatar/driver/interface.php')
| -rw-r--r-- | phpBB/phpbb/avatar/driver/interface.php | 116 | 
1 files changed, 116 insertions, 0 deletions
| diff --git a/phpBB/phpbb/avatar/driver/interface.php b/phpBB/phpbb/avatar/driver/interface.php new file mode 100644 index 0000000000..3d62969aef --- /dev/null +++ b/phpBB/phpbb/avatar/driver/interface.php @@ -0,0 +1,116 @@ +<?php +/** +* +* @package phpBB3 +* @copyright (c) 2011 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ +	exit; +} + +/** +* Interface for avatar drivers +* @package phpBB3 +*/ +interface phpbb_avatar_driver_interface +{ +	/** +	* Returns the name of the driver. +	* +	* @return string	Name of driver. +	*/ +	public function get_name(); + +	/** +	* Get the avatar url and dimensions +	* +	* @param array	$row User data or group data that has been cleaned with +	*        phpbb_avatar_manager::clean_row +	* @return array Avatar data, must have keys src, width and height, e.g. +	*        ['src' => '', 'width' => 0, 'height' => 0] +	*/ +	public function get_data($row); + +	/** +	* Returns custom html if it is needed for displaying this avatar +	* +	* @param phpbb_user $user phpBB user object +	* @param array	$row User data or group data that has been cleaned with +	*        phpbb_avatar_manager::clean_row +	* @param string $alt Alternate text for avatar image +	* +	* @return string HTML +	*/ +	public function get_custom_html($user, $row, $alt = ''); + +	/** +	* Prepare form for changing the settings of this avatar +	* +	* @param phpbb_request $request Request object +	* @param phpbb_template	$template Template object +	* @param phpbb_user $user User object +	* @param array	$row User data or group data that has been cleaned with +	*        phpbb_avatar_manager::clean_row +	* @param array	&$error Reference to an error array that is filled by this +	*        function. Key values can either be a string with a language key or +	*        an array that will be passed to vsprintf() with the language key in +	*        the first array key. +	* +	* @return bool True if form has been successfully prepared +	*/ +	public function prepare_form($request, $template, $user, $row, &$error); + +	/** +	* Prepare form for changing the acp settings of this avatar +	* +	* @param phpbb_user $user phpBB user object +	* +	* @return array Array of configuration options as consumed by acp_board. +	*        The setting for enabling/disabling the avatar will be handled by +	*        the avatar manager. +	*/ +	public function prepare_form_acp($user); + +	/** +	* Process form data +	* +	* @param phpbb_request $request Request object +	* @param phpbb_template	$template Template object +	* @param phpbb_user $user User object +	* @param array	$row User data or group data that has been cleaned with +	*        phpbb_avatar_manager::clean_row +	* @param array	&$error Reference to an error array that is filled by this +	*        function. Key values can either be a string with a language key or +	*        an array that will be passed to vsprintf() with the language key in +	*        the first array key. +	* +	* @return array Array containing the avatar data as follows: +	*        ['avatar'], ['avatar_width'], ['avatar_height'] +	*/ +	public function process_form($request, $template, $user, $row, &$error); + +	/** +	* Delete avatar +	* +	* @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, +	*        i.e. when the avatar is not hosted locally. +	*/ +	public function delete($row); + +	/** +	* Get the avatar driver's template name +	* +	* @return string Avatar driver's template name +	*/ +	public function get_template_name(); +} | 
