Public Member Functions | |
__construct (Zend_Mail $mail, Zend_Layout $layout=null) | |
getLayoutFormatter () | |
setLayoutFormatter (Zend_Log_Formatter_Interface $formatter) | |
setSubjectPrependText ($subject) | |
shutdown () | |
Protected Member Functions | |
_write ($event) | |
_getFormattedNumEntriesPerPriority () | |
Protected Attributes | |
$_eventsToMail = array() | |
$_layoutEventsToMail = array() | |
$_mail | |
$_layout | |
$_layoutFormatter | |
$_numEntriesPerPriority = array() | |
$_subjectPrependText |
Definition at line 46 of file Mail.php.
__construct | ( | Zend_Mail $ | mail, |
Zend_Layout $ | layout = null |
||
) |
Class constructor.
Constructs the mail writer; requires a Zend_Mail instance, and takes an optional Zend_Layout instance. If Zend_Layout is being used, $this->_layout->events will be set for use in the layout template.
Zend_Mail | Mail instance | |
Zend_Layout | $layout | Layout instance; optional |
_getFormattedNumEntriesPerPriority | ( | ) | [protected] |
_write | ( | $ | event ) | [protected] |
Places event line into array of lines to be used as message body.
Handles the formatting of both plaintext entries, as well as those rendered with Zend_Layout.
array | $event | Event data |
Reimplemented from Zend_Log_Writer_Abstract.
getLayoutFormatter | ( | ) |
Gets instance of Zend_Log_Formatter_Instance used for formatting a message using Zend_Layout, if applicable.
setLayoutFormatter | ( | Zend_Log_Formatter_Interface $ | formatter ) |
Sets a specific formatter for use with Zend_Layout events.
Allows use of a second formatter on lines that will be rendered with Zend_Layout. In the event that Zend_Layout is not being used, this formatter cannot be set, so an exception will be thrown.
Zend_Log_Formatter_Interface | $formatter |
Zend_Log_Exception |
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_Mail subject can only be set once, this method cannot be used if the Zend_Mail object already has a subject set.
string | $subject | Subject prepend text. |
shutdown | ( | ) |
Sends mail to recipient(s) if log entries are present. Note that both plaintext and HTML portions of email are handled here.
Reimplemented from Zend_Log_Writer_Abstract.