Documentation

Mail extends AbstractWriter
in package

Mail log writer class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
4.0.0

Table of Contents

Properties

$emails  : array<string|int, mixed>
Emails to which to send the log messages
$limit  : int|null
Log limit
$mailer  : Mailer|null
Mailer object
$options  : array<string|int, mixed>
Array of mail-specific options, i.e. subject, headers, etc.

Methods

__construct()  : mixed
Constructor
addEmails()  : Mail
Add emails
addOption()  : Mail
Add option
addOptions()  : Mail
Add options
getContext()  : string
Get context for log
getEmails()  : array<string|int, mixed>
Get emails
getLogLimit()  : int|null
Get log limit
getMailer()  : Mailer
Get mailer
getOptions()  : array<string|int, mixed>
Get options
hasLogLimit()  : bool
Has log limit
isWithinLogLimit()  : bool
Check if a log level is within the set log level limit
setEmails()  : Mail
Set emails
setLogLimit()  : AbstractWriter
Set log limit
setOptions()  : Mail
Set options
writeLog()  : Mail
Write to the log

Properties

$emails

Emails to which to send the log messages

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

$mailer

Mailer object

protected Mailer|null $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> = []

addEmails()

Add emails

public addEmails(mixed $emails) : Mail
Parameters
$emails : mixed
Return values
Mail

addOption()

Add option

public addOption(mixed $option, mixed $value) : Mail
Parameters
$option : mixed
$value : mixed
Return values
Mail

addOptions()

Add options

public addOptions(array<string|int, mixed> $options) : Mail
Parameters
$options : array<string|int, mixed>
Return values
Mail

getContext()

Get context for log

public getContext([array<string|int, mixed> $context = [] ]) : string
Parameters
$context : array<string|int, mixed> = []
Return values
string

getEmails()

Get emails

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

getLogLimit()

Get log limit

public getLogLimit() : int|null
Return values
int|null

getOptions()

Get options

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

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

setEmails()

Set emails

public setEmails(mixed $emails) : Mail
Parameters
$emails : mixed
Return values
Mail

setOptions()

Set options

public setOptions(array<string|int, mixed> $options) : Mail
Parameters
$options : array<string|int, mixed>
Return values
Mail

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> = []
Return values
Mail

        
On this page

Search results