Public Member Functions | Static Public Member Functions

LogEntry Class Reference

Inheritance diagram for LogEntry:
Collaboration diagram for LogEntry:

List of all members.

Public Member Functions

 __construct ($paramarray=array())
 insert ()
 get_event_type ()
 get_event_module ()
 get_event_severity ()
 delete ()
 __get ($name)
 __set ($name, $value)

Static Public Member Functions

static default_fields ()
static list_logentry_types ($force=false)
static list_severities ()
static list_modules ($refresh=false)
static list_types ($refresh=false)
static severity ($severity)
static severity_name ($severity)
static type ($module, $type)
static get ($paramarray=array())

Detailed Description

Definition at line 21 of file logentry.php.


Constructor & Destructor Documentation

LogEntry::__construct ( paramarray = array()  ) 

Constructor for the LogEntry class

Parameters:
array $paramarray an associative array of initial LogEntry field values

Reimplemented from QueryRecord.

Definition at line 74 of file logentry.php.


Member Function Documentation

LogEntry::__get ( name  ) 

Overrides QueryRecord __get to implement custom object properties

Parameters:
string $name Name of property to return
Returns:
mixed The requested field value

Reimplemented from QueryRecord.

Definition at line 326 of file logentry.php.

LogEntry::__set ( name,
value 
)

Overrides QueryRecord __set to implement custom object properties

Parameters:
string $name name of property to return
mixed $value The requested field value
Returns:
mixed The requested field value

Reimplemented from QueryRecord.

Definition at line 365 of file logentry.php.

static LogEntry::default_fields (  )  [static]

Return the defined database columns for an Event

Returns:
array Array of columns in the LogEntry table

Definition at line 55 of file logentry.php.

Referenced by EventLog::get().

LogEntry::delete (  ) 

Deletes this logentry

Reimplemented from QueryRecord.

Definition at line 307 of file logentry.php.

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

Return a single requested log entry.

$log= LogEntry::get( array( 'id' => 5 ) );

Parameters:
array $paramarray An associated array of parameters, or a querystring
Returns:
object LogEntry The first log entry that matched the given criteria

Definition at line 245 of file logentry.php.

LogEntry::get_event_module (  ) 

Return the log entry's event module.

$log->module

Returns:
string Human-readable event module

Definition at line 286 of file logentry.php.

Referenced by __get().

LogEntry::get_event_severity (  ) 

Return the log entry's event severity.

$log->severity

Returns:
string Human-readable event severity

Definition at line 299 of file logentry.php.

Referenced by __get().

LogEntry::get_event_type (  ) 

Return the log entry's event type.

$log->type

Returns:
string Human-readable event type

Definition at line 273 of file logentry.php.

Referenced by __get().

LogEntry::insert (  ) 

Insert this LogEntry data into the database

Reimplemented from QueryRecord.

Definition at line 206 of file logentry.php.

static LogEntry::list_logentry_types ( force = false  )  [static]

Returns an associative array of LogEntry types

Parameters:
bool $force whether to force a refresh of the cached values
Returns:
array An array of log entry type names => integer values

Definition at line 103 of file logentry.php.

Referenced by list_modules(), list_types(), and type().

static LogEntry::list_modules ( refresh = false  )  [static]

Returns an array of LogEntry modules

Parameters:
bool $refresh Whether to refresh the cached values
Returns:
array An array of LogEntry module id => name pairs

Definition at line 131 of file logentry.php.

static LogEntry::list_severities (  )  [static]

Return an array of Severities

Returns:
array An array of severity ID => name pairs

Definition at line 119 of file logentry.php.

static LogEntry::list_types ( refresh = false  )  [static]

Returns an array of LogEntry types

Parameters:
bool $refresh Whether to refresh the cached values
Returns:
array An array of LogEntry id => name pairs

Definition at line 146 of file logentry.php.

static LogEntry::severity ( severity  )  [static]

Get the integer value for the given severity, or false.

Parameters:
string $severity The severity name
Returns:
mixed numeric value for the given severity, or false

Definition at line 162 of file logentry.php.

Referenced by EventLog::get(), and insert().

static LogEntry::severity_name ( severity  )  [static]

Get the string representation of the severity numeric value.

Parameters:
integer $severity The severity index.
Returns:
string The string name of the severity, or 'Unknown'.

Definition at line 176 of file logentry.php.

Referenced by EventLog::get(), and get_event_severity().

static LogEntry::type ( module,
type 
) [static]

Get the integer value for the given module/type, or false.

Parameters:
string $module the module
string $type the type
Returns:
mixed numeric value for the given module/type, or false

Definition at line 189 of file logentry.php.

Referenced by insert().


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