rex_log_entry
in package
Log entry class.
Tags
Table of Contents
Constants
- DATE_FORMAT = 'Y-m-d\\TH:i:sP'
Methods
- __construct() : mixed
- __toString() : string
- createFromString() : rex_log_entry
- Creates a log entry from string.
- getData() : array<int, string>
- Returns the log data.
- getTimestamp() : int|string
- Returns the timestamp.
Constants
DATE_FORMAT
public
mixed
DATE_FORMAT
= 'Y-m-d\\TH:i:sP'
Methods
__construct()
public
__construct(int $timestamp, array<int, string|int> $data) : mixed
Parameters
- $timestamp : int
- $data : array<int, string|int>
-
Log data
__toString()
public
__toString() : string
Return values
stringcreateFromString()
Creates a log entry from string.
public
static createFromString(string $string) : rex_log_entry
Parameters
- $string : string
-
Log line
Return values
rex_log_entrygetData()
Returns the log data.
public
getData() : array<int, string>
Return values
array<int, string>getTimestamp()
Returns the timestamp.
public
getTimestamp([string|null $format = null ]) : int|string
Parameters
Return values
int|string —Unix timestamp or formatted string if $format is given