Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

driver_interface.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 3.73 KiB


 001  <?php
 002  /**
 003  *
 004  * This file is part of the phpBB Forum Software package.
 005  *
 006  * @copyright (c) phpBB Limited <https://www.phpbb.com>
 007  * @license GNU General Public License, version 2 (GPL-2.0)
 008  *
 009  * For full copyright and license information, please see
 010  * the docs/CREDITS.txt file.
 011  *
 012  */
 013   
 014  namespace phpbb\avatar\driver;
 015   
 016  /**
 017  * Interface for avatar drivers
 018  */
 019  interface driver_interface
 020  {
 021      /**
 022      * Returns the name of the driver.
 023      *
 024      * @return string    Name of driver.
 025      */
 026      public function get_name();
 027   
 028      /**
 029      * Returns the config name of the driver. To be used in accessing the CONFIG variables.
 030      *
 031      * @return string    Config name of driver.
 032      */
 033      public function get_config_name();
 034   
 035      /**
 036      * Get the avatar url and dimensions
 037      *
 038      * @param array    $row User data or group data that has been cleaned with
 039      *        \phpbb\avatar\manager::clean_row
 040      * @return array Avatar data, must have keys src, width and height, e.g.
 041      *        ['src' => '', 'width' => 0, 'height' => 0]
 042      */
 043      public function get_data($row);
 044   
 045      /**
 046      * Returns custom html if it is needed for displaying this avatar
 047      *
 048      * @param \phpbb\user $user phpBB user object
 049      * @param array    $row User data or group data that has been cleaned with
 050      *        \phpbb\avatar\manager::clean_row
 051      * @param string $alt Alternate text for avatar image
 052      *
 053      * @return string HTML
 054      */
 055      public function get_custom_html($user, $row, $alt = '');
 056   
 057      /**
 058      * Prepare form for changing the settings of this avatar
 059      *
 060      * @param \phpbb\request\request $request Request object
 061      * @param \phpbb\template\template    $template Template object
 062      * @param \phpbb\user $user User object
 063      * @param array    $row User data or group data that has been cleaned with
 064      *        \phpbb\avatar\manager::clean_row
 065      * @param array    &$error Reference to an error array that is filled by this
 066      *        function. Key values can either be a string with a language key or
 067      *        an array that will be passed to vsprintf() with the language key in
 068      *        the first array key.
 069      *
 070      * @return bool True if form has been successfully prepared
 071      */
 072      public function prepare_form($request, $template, $user, $row, &$error);
 073   
 074      /**
 075      * Prepare form for changing the acp settings of this avatar
 076      *
 077      * @param \phpbb\user $user phpBB user object
 078      *
 079      * @return array Array of configuration options as consumed by acp_board.
 080      *        The setting for enabling/disabling the avatar will be handled by
 081      *        the avatar manager.
 082      */
 083      public function prepare_form_acp($user);
 084   
 085      /**
 086      * Process form data
 087      *
 088      * @param \phpbb\request\request $request Request object
 089      * @param \phpbb\template\template    $template Template object
 090      * @param \phpbb\user $user User object
 091      * @param array    $row User data or group data that has been cleaned with
 092      *        \phpbb\avatar\manager::clean_row
 093      * @param array    &$error Reference to an error array that is filled by this
 094      *        function. Key values can either be a string with a language key or
 095      *        an array that will be passed to vsprintf() with the language key in
 096      *        the first array key.
 097      *
 098      * @return array Array containing the avatar data as follows:
 099      *        ['avatar'], ['avatar_width'], ['avatar_height']
 100      */
 101      public function process_form($request, $template, $user, $row, &$error);
 102   
 103      /**
 104      * Delete avatar
 105      *
 106      * @param array $row User data or group data that has been cleaned with
 107      *        \phpbb\avatar\manager::clean_row
 108      *
 109      * @return bool True if avatar has been deleted or there is no need to delete,
 110      *        i.e. when the avatar is not hosted locally.
 111      */
 112      public function delete($row);
 113   
 114      /**
 115      * Get the avatar driver's template name
 116      *
 117      * @return string Avatar driver's template name
 118      */
 119      public function get_template_name();
 120   
 121      /**
 122      * Get the avatar driver's template name (ACP)
 123      *
 124      * @return string Avatar driver's template name
 125      */
 126      public function get_acp_template_name();
 127  }
 128