aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/log/interface.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-03-17 23:50:28 +0100
committerJoas Schilling <nickvergessen@gmx.de>2012-08-21 11:59:25 +0200
commitcf651ef81d611865a06d93c9db7c4dfcd680405c (patch)
treefc7ee7017216e362cb99a8b1782c8858c242ca53 /phpBB/includes/log/interface.php
parent310c9069328172a7c0cb890d96b5eb4d14523e78 (diff)
downloadforums-cf651ef81d611865a06d93c9db7c4dfcd680405c.tar
forums-cf651ef81d611865a06d93c9db7c4dfcd680405c.tar.gz
forums-cf651ef81d611865a06d93c9db7c4dfcd680405c.tar.bz2
forums-cf651ef81d611865a06d93c9db7c4dfcd680405c.tar.xz
forums-cf651ef81d611865a06d93c9db7c4dfcd680405c.zip
[ticket/10714] Implement a class to add logs to the database.
PHPBB3-10714
Diffstat (limited to 'phpBB/includes/log/interface.php')
-rw-r--r--phpBB/includes/log/interface.php55
1 files changed, 55 insertions, 0 deletions
diff --git a/phpBB/includes/log/interface.php b/phpBB/includes/log/interface.php
new file mode 100644
index 0000000000..897b8a8211
--- /dev/null
+++ b/phpBB/includes/log/interface.php
@@ -0,0 +1,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);
+}