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

log_interface.php

Zuletzt modifiziert: 09.10.2024, 12:52 - Dateigröße: 4.11 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\log;
 015   
 016  /**
 017  * The interface for the log-system.
 018  */
 019  interface log_interface
 020  {
 021      /**
 022      * This function returns the state of the log system.
 023      *
 024      * @param    string    $type    The log type we want to check. Empty to get
 025      *                            global log status.
 026      *
 027      * @return    bool    True if log for the type is enabled
 028      */
 029      public function is_enabled($type = '');
 030   
 031      /**
 032      * Disable log
 033      *
 034      * This function allows disabling the log system or parts of it, for this
 035      * page call. When add_log is called and the type is disabled,
 036      * the log will not be added to the database.
 037      *
 038      * @param    mixed    $type    The log type we want to disable. Empty to
 039      *                        disable all logs. Can also be an array of types.
 040      *
 041      * @return    null
 042      */
 043      public function disable($type = '');
 044   
 045      /**
 046      * Enable log
 047      *
 048      * This function allows re-enabling the log system.
 049      *
 050      * @param    mixed    $type    The log type we want to enable. Empty to
 051      *                        enable all logs. Can also be an array of types.
 052      *
 053      * @return    null
 054      */
 055      public function enable($type = '');
 056   
 057      /**
 058      * Adds a log entry to the database
 059      *
 060      * @param    string    $mode                The mode defines which log_type is used and from which log the entry is retrieved
 061      * @param    int        $user_id            User ID of the user
 062      * @param    string    $log_ip                IP address of the user
 063      * @param    string    $log_operation        Name of the operation
 064      * @param    int        $log_time            Timestamp when the log entry was added, if empty time() will be used
 065      * @param    array    $additional_data    More arguments can be added, depending on the log_type
 066      *
 067      * @return    int|bool        Returns the log_id, if the entry was added to the database, false otherwise.
 068      */
 069      public function add($mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = array());
 070   
 071      /**
 072      * Delete entries in the logs
 073      *
 074      * @param     string    $mode        The mode defines which log_type is used and from which log the entries are deleted
 075      * @param     array    $conditions    An array of conditions, 3 different  forms are accepted
 076      *                                 1) <key> => <value> transformed into 'AND <key> = <value>' (value should be an integer)
 077      *                                2) <key> => array(<operator>, <value>) transformed into 'AND <key> <operator> <value>' (values can't be an array)
 078      *                                3) <key> => array('IN' => array(<values>)) transformed into 'AND <key> IN <values>'
 079      *                                A special field, keywords, can also be defined. In this case only the log entries that have the keywords in log_operation or log_data will be deleted.
 080      */
 081      public function delete($mode, $conditions = array());
 082   
 083      /**
 084      * Grab the logs from the database
 085      *
 086      * @param    string    $mode            The mode defines which log_type is used and ifrom which log the entry is retrieved
 087      * @param    bool    $count_logs        Shall we count all matching log entries?
 088      * @param    int        $limit            Limit the number of entries that are returned
 089      * @param    int        $offset            Offset when fetching the log entries, f.e. when paginating
 090      * @param    mixed    $forum_id        Restrict the log entries to the given forum_id (can also be an array of forum_ids)
 091      * @param    int        $topic_id        Restrict the log entries to the given topic_id
 092      * @param    int        $user_id        Restrict the log entries to the given user_id
 093      * @param    int        $log_time        Only get log entries newer than the given timestamp
 094      * @param    string    $sort_by        SQL order option, e.g. 'l.log_time DESC'
 095      * @param    string    $keywords        Will only return log entries that have the keywords in log_operation or log_data
 096      *
 097      * @return    array            The result array with the logs
 098      */
 099      public function get_logs($mode, $count_logs = true, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $log_time = 0, $sort_by = 'l.log_time DESC', $keywords = '');
 100   
 101      /**
 102      * Get total log count
 103      *
 104      * @return    int            Returns the number of matching logs from the last call to get_logs()
 105      */
 106      public function get_log_count();
 107   
 108      /**
 109      * Get offset of the last valid page
 110      *
 111      * @return    int            Returns the offset of the last valid page from the last call to get_logs()
 112      */
 113      public function get_valid_offset();
 114  }
 115