phpBB API Documentation
Class

phpbb\log\null

class null implements log_interface

Null logger

Methods

is_enabled($type = '')

This function returns the state of the log system.

disable($type = '')

Disable log

enable($type = '')

Enable log

add($mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = array())

Adds a log entry to the database

delete(string $mode, array $conditions = array())

Delete entries in the logs

get_logs($mode, $count_logs = true, $limit, $offset, $forum_id, $topic_id, $user_id, $log_time, $sort_by = 'l.log_time DESC', $keywords = '')

Grab the logs from the database

get_log_count()

Get total log count

get_valid_offset()

Get offset of the last valid page

Details

at line 24
public is_enabled($type = '')

This function returns the state of the log system.

Parameters

$type

at line 32
public disable($type = '')

Disable log

This function allows disabling the log system or parts of it, for this page call. When add_log is called and the type is disabled, the log will not be added to the database.

Parameters

$type

at line 39
public enable($type = '')

Enable log

This function allows re-enabling the log system.

Parameters

$type

at line 46
public add($mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = array())

Adds a log entry to the database

Parameters

$mode
$user_id
$log_ip
$log_operation
$log_time
$additional_data

at line 54
public delete(string $mode, array $conditions = array())

Delete entries in the logs

Parameters

string $mode The mode defines which log_type is used and from which log the entries are deleted
array $conditions An array of conditions, 3 different forms are accepted 1) => transformed into 'AND = ' (value should be an integer) 2) => array(, ) transformed into 'AND ' (values can't be an array) 3) => array('IN' => array()) transformed into 'AND IN ' A special field, keywords, can also be defined. In this case only the log entries that have the keywords in logoperation or logdata will be deleted.

at line 61
public get_logs($mode, $count_logs = true, $limit, $offset, $forum_id, $topic_id, $user_id, $log_time, $sort_by = 'l.log_time DESC', $keywords = '')

Grab the logs from the database

Parameters

$mode
$count_logs
$limit
$offset
$forum_id
$topic_id
$user_id
$log_time
$sort_by
$keywords

at line 69
public get_log_count()

Get total log count

at line 77
public get_valid_offset()

Get offset of the last valid page