\rex_log_entry

Log entry class.

Summary

Methods
Properties
Constants
__construct()
createFromString()
getTimestamp()
getData()
__toString()
No public properties found
DATE_FORMAT
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

DATE_FORMAT

DATE_FORMAT = 'Y-m-d H:i:s'

Methods

__construct()

__construct(int  $timestamp, array  $data) : mixed

Constructor.

Parameters

int $timestamp

Timestamp

array $data

Log data

Returns

mixed —

createFromString()

createFromString(string  $string) : \rex_log_entry

Creates a log entry from string.

Parameters

string $string

Log line

Returns

\rex_log_entry —

getTimestamp()

getTimestamp(string  $format = null) : int|string

Returns the timestamp.

Parameters

string $format

See {@link}

Returns

int|string —

Unix timestamp or formatted string if $format is given

getData()

getData() : array

Returns the log data.

Returns

array —

__toString()

__toString() : string

Returns

string —