phpbb/phpBB/includes/avatar/driver/interface.php
Marc Alexander d5cbedaaa2 [feature/avatars] Let avatar manager handle $ignore_config
The avatar manager already handles if avatars are enabled. It should also
handle ignoring the config settings.

PHPBB3-10018
2012-11-30 15:12:34 +01:00

98 lines
2.3 KiB
PHP

<?php
/**
*
* @package avatar
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* Interface for avatar drivers
* @package avatars
*/
interface phpbb_avatar_driver_interface
{
/**
* Returns the name of the driver.
*
* @return string Name of wrapped 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 string $alt Alternate text for avatar image
*
* @return string HTML
*/
public function get_custom_html($row, $alt = '');
/**
* Prepare form for changing the settings of this avatar
*
* @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 Reference to an error array
*
* @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 Array containing the acp settings
*/
public function prepare_form_acp();
/**
* Process form data
*
* @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 Reference to an error array
*
* @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 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);
/**
* Get the avatars template name
*
* @return string Avatar's template name
*/
public function get_template_name();
}