Mail
extends AbstractWriter
in package
Mail log writer class
Tags
Table of Contents
- $emails : array<string|int, mixed>
- Emails to which to send the log messages
- $limit : int
- Log limit
- $mailer : Mailer
- Mailer object
- $options : array<string|int, mixed>
- Array of mail-specific options, i.e. subject, headers, etc.
- __construct() : mixed
- Constructor
- getContext() : string
- Get context for log
- getLogLimit() : int
- Get log limit
- hasLogLimit() : bool
- Has log limit
- isWithinLogLimit() : bool
- Check if a log level is within the set log level limit
- setLogLimit() : AbstractWriter
- Set log limit
- writeLog() : Mail
- Write to the log
Properties
$emails
Emails to which to send the log messages
protected
array<string|int, mixed>
$emails
= []
$limit
Log limit
protected
int
$limit
= null
$mailer
Mailer object
protected
Mailer
$mailer
= null
$options
Array of mail-specific options, i.e. subject, headers, etc.
protected
array<string|int, mixed>
$options
= []
Methods
__construct()
Constructor
public
__construct(Mailer $mailer, mixed $emails[, array<string|int, mixed> $options = [] ]) : mixed
Instantiate the Mail writer object
Parameters
- $mailer : Mailer
- $emails : mixed
- $options : array<string|int, mixed> = []
Return values
mixed —getContext()
Get context for log
public
getContext([array<string|int, mixed> $context = [] ]) : string
Parameters
- $context : array<string|int, mixed> = []
Return values
string —getLogLimit()
Get log limit
public
getLogLimit() : int
Return values
int —hasLogLimit()
Has log limit
public
hasLogLimit() : bool
Return values
bool —isWithinLogLimit()
Check if a log level is within the set log level limit
public
isWithinLogLimit(int $level) : bool
Parameters
- $level : int
Return values
bool —setLogLimit()
Set log limit
public
setLogLimit(int $level) : AbstractWriter
Parameters
- $level : int
Return values
AbstractWriter —writeLog()
Write to the log
public
writeLog(mixed $level, string $message[, array<string|int, mixed> $context = [] ]) : Mail
Parameters
- $level : mixed
- $message : string
- $context : array<string|int, mixed> = []