Documentation

rex_log_entry
in package

Log entry class.

Tags
author

gharlan

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
string

createFromString()

Creates a log entry from string.

public static createFromString(string $string) : rex_log_entry
Parameters
$string : string

Log line

Return values
rex_log_entry

getData()

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
$format : string|null = null

Deprecated since 5.13.0, use rex_formatter::intl* instead. Format for

Return values
int|string

Unix timestamp or formatted string if $format is given


        
On this page

Search results