Properties

$processors

$processors : callable[]

Type

callable[]

$formatter

$formatter : ?\Monolog\Formatter\FormatterInterface

Type

FormatterInterface

$level

$level : int

Type

int

$bubble

$bubble : bool

Type

bool

$to

$to : string[]

The email addresses to which the message will be sent

Type

string[]

$subject

$subject : string

The subject of the email

Type

string

$headers

$headers : string[]

Optional headers for the message

Type

string[]

$parameters

$parameters : string[]

Optional parameters for the message

Type

string[]

$maxColumnWidth

$maxColumnWidth : int

The wordwrap length for the message

Type

int

$contentType

$contentType : string|null

The Content-type for the message

Type

string|null

$encoding

$encoding : string

The encoding for the message

Type

string

Methods

handleBatch()

handleBatch(array  $records) : void

Handles a set of records at once.

Parameters

array $records

The records to handle (an array of record arrays)

handle()

handle(array  $record) : bool

{@inheritDoc}

Parameters

array $record

Returns

bool —

reset()

reset() : void

pushProcessor()

pushProcessor(callable  $callback) : \Monolog\Handler\HandlerInterface

{@inheritDoc}

Parameters

callable $callback

Returns

\Monolog\Handler\HandlerInterface —

popProcessor()

popProcessor() : callable

{@inheritDoc}

Returns

callable —

setFormatter()

setFormatter(\Monolog\Formatter\FormatterInterface  $formatter) : \Monolog\Handler\HandlerInterface

{@inheritDoc}

Parameters

\Monolog\Formatter\FormatterInterface $formatter

Returns

\Monolog\Handler\HandlerInterface —

getFormatter()

getFormatter() : \Monolog\Formatter\FormatterInterface

{@inheritDoc}

Returns

\Monolog\Formatter\FormatterInterface —

__construct()

__construct(string|string[]  $to, string  $subject, string  $from, mixed  $level = Logger::ERROR, bool  $bubble = true, int  $maxColumnWidth = 70) : mixed

Parameters

string|string[] $to

The receiver of the mail

string $subject

The subject of the mail

string $from

The sender of the mail

mixed $level
bool $bubble
int $maxColumnWidth

The maximum column width that the message lines will have

Returns

mixed —

isHandling()

isHandling(array  $record) : bool

{@inheritDoc}

Parameters

array $record

Returns

bool —

setLevel()

setLevel(mixed  $level) : self

Sets minimum logging level at which this handler will be triggered.

Parameters

mixed $level

Returns

self —

getLevel()

getLevel() : int

Gets minimum logging level at which this handler will be triggered.

Returns

int —

setBubble()

setBubble(bool  $bubble) : self

Sets the bubbling behavior.

Parameters

bool $bubble

true means that this handler allows bubbling. false means that bubbling is not permitted.

Returns

self —

getBubble()

getBubble() : bool

Gets the bubbling behavior.

Returns

bool —

true means that this handler allows bubbling. false means that bubbling is not permitted.

close()

close() : void

Closes the handler.

__destruct()

__destruct() : mixed

Returns

mixed —

__sleep()

__sleep() : mixed

Returns

mixed —

addHeader()

addHeader(string|string[]  $headers) : self

Add headers to the message

Parameters

string|string[] $headers

Custom added headers

Returns

self —

addParameter()

addParameter(string|string[]  $parameters) : self

Add parameters to the message

Parameters

string|string[] $parameters

Custom added parameters

Returns

self —

getContentType()

getContentType() : ?string

Returns

?string —

getEncoding()

getEncoding() : string

Returns

string —

setContentType()

setContentType(string  $contentType) : self

Parameters

string $contentType

The content type of the email - Defaults to text/plain. Use text/html for HTML messages.

Returns

self —

setEncoding()

setEncoding(string  $encoding) : self

Parameters

string $encoding

Returns

self —

send()

send(string  $content, array  $records) : void

Send a mail with the given content

Parameters

string $content

formatted email body to be sent

array $records

the array of log records that formed this content

write()

write(array  $record) : void

Writes the record down to the log of the implementing handler

Parameters

array $record

getHighestRecord()

getHighestRecord(array  $records) : array

Parameters

array $records

Returns

array —

isHtmlBody()

isHtmlBody(string  $body) : bool

Parameters

string $body

Returns

bool —

getDefaultFormatter()

getDefaultFormatter() : \Monolog\Formatter\FormatterInterface

Gets the default formatter.

Overwrite this if the LineFormatter is not a good default for your handler.

Returns

\Monolog\Formatter\FormatterInterface —

processRecord()

processRecord(array  $record) : array

Processes a record.

Parameters

array $record

Returns

array —

resetProcessors()

resetProcessors() : void