rex_log_file
in package
implements
Iterator
Uses
rex_factory_trait
Log file class.
Tags
Table of Contents
Interfaces
- Iterator
Methods
- __construct() : mixed
- add() : void
- Adds a log entry.
- current() : rex_log_entry
- delete() : bool
- Deletes a log file and its rotations.
- factory() : static
- key() : int|null
- next() : mixed
- Reads the log file backwards line by line (each call reads one line).
- rewind() : mixed
- valid() : mixed
Methods
__construct()
public
__construct(string $path[, int|null $maxFileSize = null ]) : mixed
Parameters
- $path : string
-
File path
- $maxFileSize : int|null = null
-
Maximum file size
Tags
add()
Adds a log entry.
public
add(array<int, string|int> $data) : void
Parameters
- $data : array<int, string|int>
-
Log data
current()
public
current() : rex_log_entry
Return values
rex_log_entrydelete()
Deletes a log file and its rotations.
public
static delete(string $path) : bool
Parameters
- $path : string
-
File path
Return values
boolfactory()
public
static factory(string $path[, int|null $maxFileSize = null ]) : static
Parameters
- $path : string
- $maxFileSize : int|null = null
Return values
statickey()
public
key() : int|null
Return values
int|nullnext()
Reads the log file backwards line by line (each call reads one line).
public
next() : mixed
rewind()
public
rewind() : mixed
valid()
public
valid() : mixed