aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/log/interface.php
blob: 897b8a8211a600e85784995e58aabfcfaff58c54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
*
* @package phpbb_log
* @copyright (c) 2012 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/**
* The interface for the log-system.
*
* @package phpbb_log
*/
interface phpbb_log_interface
{
	/**
	* This function returns the state of the log-system.
	*
	* @return	bool	True if log is enabled
	*/
	public function is_enabled();

	/**
	* This function allows disable the log-system. When add_log is called, the log will not be added to the database.
	*/
	public function disable();

	/**
	* This function allows re-enable the log-system.
	*/
	public function enable();

	/**
	* Adds a log to the database
	*
	* @param	string	$mode				The mode defines which log_type is used and in which log the entry is displayed.
	* @param	int		$user_id			User ID of the user
	* @param	string	$log_ip				IP address of the user
	* @param	string	$log_operation		Name of the operation
	* @param	int		$log_time			Timestamp when the log was added.
	* @param	array	$additional_data	More arguments can be added, depending on the log_type
	*
	* @return	int|bool		Returns the log_id, if the entry was added to the database, false otherwise.
	*/
	public function add($mode, $user_id, $log_ip, $log_operation, $log_time, $additional_data);
}