Documentation

AlertLogger
in package

Table of Contents

Properties

$logs  : array<string|int, mixed>

Methods

__construct()  : mixed
all()  : array<string|int, mixed>
Retrieve all logs.
get()  : array<string|int, mixed>
Retrieve logs of a specific alert type.
getErrors()  : array<string|int, mixed>
Getters for error messages.
getInfo()  : array<string|int, mixed>
Getters for info messages.
getSuccesses()  : array<string|int, mixed>
Getters for success messages.
getWarnings()  : array<string|int, mixed>
Getters for warning messages.
log()  : void
Log a message with a specific alert type.
setError()  : void
Setters for error messages.
setInfo()  : void
Setters for info messages.
setSuccess()  : void
Setters for success messages.
setWarning()  : void
Setters for other warning messages.

Properties

$logs

protected array<string|int, mixed> $logs = []

Stores logs categorized by alert type.

Methods

all()

Retrieve all logs.

public all() : array<string|int, mixed>
Return values
array<string|int, mixed>

All logs categorized by alert type.

get()

Retrieve logs of a specific alert type.

public get(AlertType $type) : array<string|int, mixed>
Parameters
$type : AlertType

The type of alert to retrieve.

Return values
array<string|int, mixed>

The logs for the specified alert type.

getErrors()

Getters for error messages.

public getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed>

The error messages logged.

getInfo()

Getters for info messages.

public getInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>

The info messages logged.

getSuccesses()

Getters for success messages.

public getSuccesses() : array<string|int, mixed>
Return values
array<string|int, mixed>

The success messages logged.

getWarnings()

Getters for warning messages.

public getWarnings() : array<string|int, mixed>
Return values
array<string|int, mixed>

The warning messages logged.

log()

Log a message with a specific alert type.

public log(string $message, AlertType $type) : void
Parameters
$message : string

The message to log.

$type : AlertType

The type of alert.

setError()

Setters for error messages.

public setError(string $message) : void
Parameters
$message : string

The error message to log.

setInfo()

Setters for info messages.

public setInfo(string $message) : void
Parameters
$message : string

The info message to log.

setSuccess()

Setters for success messages.

public setSuccess(string $message) : void
Parameters
$message : string

The success message to log.

setWarning()

Setters for other warning messages.

public setWarning(string $message) : void
Parameters
$message : string

The warning message to log.


        
On this page

Search results