PHP 클래스 Habari\LogEntry

Represents a log entry
상속: extends QueryRecord
파일 보기 프로젝트 열기: habari/system

공개 메소드들

메소드 설명
__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