\rex_log_file

Log file class.

Summary

Methods
Properties
Constants
__construct()
add()
current()
next()
key()
valid()
rewind()
delete()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(string  $path, int|null  $maxFileSize = null) : mixed

Constructor.

Parameters

string $path

File path

int|null $maxFileSize

Maximum file size

Returns

mixed —

add()

add(array  $data) : mixed

Adds a log entry.

Parameters

array $data

Log data

Returns

mixed —

current()

current() : \rex_log_entry

Returns

\rex_log_entry —

next()

next() : mixed

Reads the log file backwards line by line (each call reads one line).

Returns

mixed —

key()

key() : int|null

Returns

int|null —

valid()

valid() : mixed

{@inheritdoc}

Returns

mixed —

rewind()

rewind() : mixed

{@inheritdoc}

Returns

mixed —

delete()

delete(string  $path) : bool

Deletes a log file and its rotations.

Parameters

string $path

File path

Returns

bool —