PHP Класс Habari\LogEntry

Represents a log entry
Наследование: extends QueryRecord
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( array $paramarray = [] ) Constructor for the LogEntry class
__get ( string $name ) : mixed Overrides QueryRecord __get to implement custom object properties
__set ( string $name, mixed $value ) : mixed Overrides QueryRecord __set to implement custom object properties
default_fields ( ) : array Return the defined database columns for an Event
delete ( ) Deletes this logentry
get ( array $paramarray = [] ) : object Return a single requested log entry.
get_event_module ( ) : string Return the log entry's event module.
get_event_severity ( ) : string Return the log entry's event severity.
get_event_type ( ) : string Return the log entry's event type.
insert ( ) Insert this LogEntry data into the database
list_logentry_types ( boolean $force = false ) : array Returns an associative array of LogEntry types
list_modules ( boolean $refresh = false ) : array Returns an array of LogEntry modules
list_severities ( ) : array Return an array of Severities
list_types ( boolean $refresh = false ) : array Returns an array of LogEntry types
severity ( string $severity ) : mixed Get the integer value for the given severity, or false.
severity_name ( integer $severity ) : string Get the string representation of the severity numeric value.
type ( string $module, string $type ) : mixed Get the integer value for the given module/type, or false.

Приватные методы

Метод Описание
severities ( $translate = true ) Defined event severities

Описание методов

__construct() публичный Метод

Constructor for the LogEntry class
public __construct ( array $paramarray = [] )
$paramarray array an associative array of initial LogEntry field values

__get() публичный Метод

Overrides QueryRecord __get to implement custom object properties
public __get ( string $name ) : mixed
$name string Name of property to return
Результат mixed The requested field value

__set() публичный Метод

Overrides QueryRecord __set to implement custom object properties
public __set ( string $name, mixed $value ) : mixed
$name string name of property to return
$value mixed The requested field value
Результат mixed The requested field value

default_fields() публичный статический Метод

Return the defined database columns for an Event
public static default_fields ( ) : array
Результат array Array of columns in the LogEntry table

delete() публичный Метод

Deletes this logentry
public delete ( )

get() публичный статический Метод

$log= LogEntry::get( array( 'id' => 5 ) );
public static get ( array $paramarray = [] ) : object
$paramarray array An associated array of parameters, or a querystring
Результат object LogEntry The first log entry that matched the given criteria

get_event_module() публичный Метод

$log->module
public get_event_module ( ) : string
Результат string Human-readable event module

get_event_severity() публичный Метод

$log->severity
public get_event_severity ( ) : string
Результат string Human-readable event severity

get_event_type() публичный Метод

$log->type
public get_event_type ( ) : string
Результат string Human-readable event type

insert() публичный Метод

Insert this LogEntry data into the database
public insert ( )

list_logentry_types() публичный статический Метод

Returns an associative array of LogEntry types
public static list_logentry_types ( boolean $force = false ) : array
$force boolean whether to force a refresh of the cached values
Результат array An array of log entry type names => integer values

list_modules() публичный статический Метод

Returns an array of LogEntry modules
public static list_modules ( boolean $refresh = false ) : array
$refresh boolean Whether to refresh the cached values
Результат array An array of LogEntry module id => name pairs

list_severities() публичный статический Метод

Return an array of Severities
public static list_severities ( ) : array
Результат array An array of severity ID => name pairs

list_types() публичный статический Метод

Returns an array of LogEntry types
public static list_types ( boolean $refresh = false ) : array
$refresh boolean Whether to refresh the cached values
Результат array An array of LogEntry id => name pairs

severity() публичный статический Метод

Get the integer value for the given severity, or false.
public static severity ( string $severity ) : mixed
$severity string The severity name
Результат mixed numeric value for the given severity, or false

severity_name() публичный статический Метод

Get the string representation of the severity numeric value.
public static severity_name ( integer $severity ) : string
$severity integer The severity index.
Результат string The string name of the severity, or 'Unknown'.

type() публичный статический Метод

Get the integer value for the given module/type, or false.
public static type ( string $module, string $type ) : mixed
$module string the module
$type string the type
Результат mixed numeric value for the given module/type, or false