Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

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.41 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      * Get the avatar url and dimensions
030      *
031      * @param array    $row User data or group data that has been cleaned with
032      *        \phpbb\avatar\manager::clean_row
033      * @return array Avatar data, must have keys src, width and height, e.g.
034      *        ['src' => '', 'width' => 0, 'height' => 0]
035      */
036      public function get_data($row);
037   
038      /**
039      * Returns custom html if it is needed for displaying this avatar
040      *
041      * @param \phpbb\user $user phpBB user object
042      * @param array    $row User data or group data that has been cleaned with
043      *        \phpbb\avatar\manager::clean_row
044      * @param string $alt Alternate text for avatar image
045      *
046      * @return string HTML
047      */
048      public function get_custom_html($user, $row, $alt = '');
049   
050      /**
051      * Prepare form for changing the settings of this avatar
052      *
053      * @param \phpbb\request\request $request Request object
054      * @param \phpbb\template\template    $template Template object
055      * @param \phpbb\user $user User object
056      * @param array    $row User data or group data that has been cleaned with
057      *        \phpbb\avatar\manager::clean_row
058      * @param array    &$error Reference to an error array that is filled by this
059      *        function. Key values can either be a string with a language key or
060      *        an array that will be passed to vsprintf() with the language key in
061      *        the first array key.
062      *
063      * @return bool True if form has been successfully prepared
064      */
065      public function prepare_form($request, $template, $user, $row, &$error);
066   
067      /**
068      * Prepare form for changing the acp settings of this avatar
069      *
070      * @param \phpbb\user $user phpBB user object
071      *
072      * @return array Array of configuration options as consumed by acp_board.
073      *        The setting for enabling/disabling the avatar will be handled by
074      *        the avatar manager.
075      */
076      public function prepare_form_acp($user);
077   
078      /**
079      * Process form data
080      *
081      * @param \phpbb\request\request $request Request object
082      * @param \phpbb\template\template    $template Template object
083      * @param \phpbb\user $user User object
084      * @param array    $row User data or group data that has been cleaned with
085      *        \phpbb\avatar\manager::clean_row
086      * @param array    &$error Reference to an error array that is filled by this
087      *        function. Key values can either be a string with a language key or
088      *        an array that will be passed to vsprintf() with the language key in
089      *        the first array key.
090      *
091      * @return array Array containing the avatar data as follows:
092      *        ['avatar'], ['avatar_width'], ['avatar_height']
093      */
094      public function process_form($request, $template, $user, $row, &$error);
095   
096      /**
097      * Delete avatar
098      *
099      * @param array $row User data or group data that has been cleaned with
100      *        \phpbb\avatar\manager::clean_row
101      *
102      * @return bool True if avatar has been deleted or there is no need to delete,
103      *        i.e. when the avatar is not hosted locally.
104      */
105      public function delete($row);
106   
107      /**
108      * Get the avatar driver's template name
109      *
110      * @return string Avatar driver's template name
111      */
112      public function get_template_name();
113  }
114