Zend Framework
3.0
|
Class used for writing log messages to email via Zend. More...
Public Member Functions | |
__construct ($mail, Transport\TransportInterface $transport=null) | |
Constructor. | |
setTransport (Transport\TransportInterface $transport) | |
Set the transport message. | |
setSubjectPrependText ($subject) | |
Allows caller to have the mail subject dynamically set to contain the entry counts per-priority level. | |
shutdown () | |
Sends mail to recipient(s) if log entries are present. | |
Public Member Functions inherited from AbstractWriter | |
__construct ($options=null) | |
Constructor. | |
addFilter ($filter, array $options=null) | |
Add a filter specific to this writer. | |
getFilterPluginManager () | |
Get filter plugin manager. | |
setFilterPluginManager ($plugins) | |
Set filter plugin manager. | |
filterPlugin ($name, array $options=null) | |
Get filter instance. | |
getFormatterPluginManager () | |
Get formatter plugin manager. | |
setFormatterPluginManager ($plugins) | |
Set formatter plugin manager. | |
formatterPlugin ($name, array $options=null) | |
Get formatter instance. | |
write (array $event) | |
Log a message to this writer. | |
setFormatter ($formatter, array $options=null) | |
Set a new formatter for this writer. | |
setConvertWriteErrorsToExceptions ($convertErrors) | |
Set convert write errors to exception flag. | |
shutdown () | |
Perform shutdown activities such as closing open resources. | |
Public Member Functions inherited from WriterInterface | |
addFilter ($filter) | |
Add a log filter to the writer. | |
setFormatter ($formatter) | |
Set a message formatter for the writer. | |
Protected Member Functions | |
doWrite (array $event) | |
Places event line into array of lines to be used as message body. | |
getFormattedNumEntriesPerPriority () | |
Gets a string of number of entries per-priority level that occurred, or an empty string if none occurred. | |
Protected Member Functions inherited from AbstractWriter | |
getFormatter () | |
Get formatter. | |
hasFormatter () | |
Check if the writer has a formatter. | |
doWrite (array $event) | |
Write a message to the log. | |
Protected Attributes | |
$eventsToMail = [] | |
$transport | |
$numEntriesPerPriority = [] | |
$subjectPrependText | |
Protected Attributes inherited from AbstractWriter | |
$filterPlugins | |
$formatterPlugins | |
$filters = [] | |
$formatter | |
$convertWriteErrorsToExceptions = true | |
$errorsToExceptionsConversionLevel = E_WARNING | |
Class used for writing log messages to email via Zend.
Allows for emailing log messages at and above a certain level via a Zend object. Note that this class only sends the email upon completion, so any log entries accumulated are sent in a single email. The email is sent using a Zend object (Sendmail is default).
__construct | ( | $mail, | |
Transport\TransportInterface | $transport = null |
||
) |
Constructor.
MailMessage | array | Traversable | ||
Transport\TransportInterface | $transport | Optional |
Exception\InvalidArgumentException |
|
protected |
Places event line into array of lines to be used as message body.
array | $event | Event data |
|
protected |
Gets a string of number of entries per-priority level that occurred, or an empty string if none occurred.
setSubjectPrependText | ( | $subject | ) |
Allows caller to have the mail subject dynamically set to contain the entry counts per-priority level.
Sets the text for use in the subject, with entry counts per-priority level appended to the end. Since a Zend subject can only be set once, this method cannot be used if the Zend object already has a subject set.
string | $subject | Subject prepend text |
setTransport | ( | Transport\TransportInterface | $transport | ) |
shutdown | ( | ) |
Sends mail to recipient(s) if log entries are present.
Note that both plaintext and HTML portions of email are handled here.
Implements WriterInterface.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |