Public Member Functions | Static Public Member Functions | Protected Attributes

EventLog Class Reference

List of all members.

Public Member Functions

 __get ($name)

Static Public Member Functions

static register_type ($type= 'default', $module=null)
static unregister_type ($type= 'default', $module=null)
static log ($message, $severity= 'info', $type= 'default', $module=null, $data=null)
static get_module ($module=null, $level=2)
static get ($paramarray=array())
static trim ()
static purge ()

Protected Attributes

 $get_param_cache

Detailed Description

Habari EventLog class

Todo:
Apply system error handling

Definition at line 12 of file eventlog.php.


Member Function Documentation

EventLog::__get ( name  ) 

Returns properties of a EventLog object. This is the function that returns information about the set of log entries that was requested. This function should offer property names that are identical to properties of instances of the URL class. A call to EventLog::get() without parameters should return mostly the same property values as the global $url object for the request. The difference would occur when the data returned doesn't necessarily match the request, such as when several log entries are requested, but only one is available to return.

Parameters:
string The name of the property to return.

Definition at line 28 of file eventlog.php.

static EventLog::get ( paramarray = array()  )  [static]

Returns a LogEntry or EventLog array based on supplied parameters. By default,fetch as many entries as pagination allows and order them in a descending fashion based on timestamp.

Todo:
Cache query results.
Parameters:
array $paramarry An associated array of parameters, or a querystring
Returns:
array An array of LogEntry objects, or a single LogEntry object, depending on request

Build the pubdate If we've got the day, then get the date. If we've got the month, but no date, get the month. If we've only got the year, get the whole year.

Todo:
Ensure that we've actually got all the needed parts when we query on them

Definition at line 123 of file eventlog.php.

Referenced by AdminLogsHandler::ajax_delete_logs(), and CoreDashModules::filter_dash_module_latest_log_activity().

static EventLog::get_module ( module = null,
level = 2 
) [static]

Get the module in which the logged code was executed

Parameters:
integer $level How many backtrace calls to go back through the trace
Returns:
string The classname or .php module in which the log code was called.

Definition at line 105 of file eventlog.php.

Referenced by log().

static EventLog::log ( message,
severity = 'info',
type = 'default',
module = null,
data = null 
) [static]
static EventLog::register_type ( type = 'default',
module = null 
) [static]

Adds a logging type to the lookup table

Parameters:
string $type The type of the error
string $module The module of the error

Definition at line 44 of file eventlog.php.

Referenced by Pingback::action_plugin_activation(), and LogEntry::type().

static EventLog::unregister_type ( type = 'default',
module = null 
) [static]

Removes a logging type from the lookup table

Parameters:
string $type The type of the error
string $module The module of the error

Definition at line 60 of file eventlog.php.

Referenced by Pingback::action_plugin_deactivation().


The documentation for this class was generated from the following file: