Zend Framework
1.12
|
Public Member Functions | |
__construct (Zend_Mail $mail, Zend_Layout $layout=null) | |
Class constructor. | |
setLayout ($layout) | |
Set the layout. | |
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. | |
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. | |
![]() | |
addFilter ($filter) | |
Add a filter specific to this writer. | |
write ($event) | |
Log a message to this writer. | |
setFormatter (Zend_Log_Formatter_Interface $formatter) | |
Set a new formatter for this writer. | |
shutdown () | |
Perform shutdown activites such as closing open resources. | |
Static Public Member Functions | |
static | factory ($config) |
Create a new instance of Zend_Log_Writer_Mail. | |
Protected Member Functions | |
_constructLayoutFromConfig (array $config) | |
Construct a Zend_Layout instance based on a configuration array. | |
_write ($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 emptry string if none occurred. | |
![]() | |
_write ($event) | |
Write a message to the log. | |
Static Protected Member Functions | |
static | _constructMailFromConfig (array $config) |
Construct a Zend_Mail instance based on a configuration array. | |
![]() | |
static | _parseConfig ($config) |
Validate and optionally convert the config to array. | |
Protected Attributes | |
$_eventsToMail = array() | |
$_layoutEventsToMail = array() | |
$_mail | |
$_layout | |
$_layoutFormatter | |
$_numEntriesPerPriority = array() | |
$_subjectPrependText | |
![]() | |
$_filters = array() | |
$_formatter | |
Static Protected Attributes | |
static | $_methodMapHeaders |
__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 |
|
protected |
Construct a Zend_Layout instance based on a configuration array.
array | $config |
Zend_Log_Exception |
|
staticprotected |
Construct a Zend_Mail instance based on a configuration array.
array | $config |
Zend_Log_Exception |
|
protected |
Gets a string of number of entries per-priority level that occurred, or an emptry string if none occurred.
|
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 |
|
static |
Create a new instance of Zend_Log_Writer_Mail.
array | Zend_Config | $config |
Implements Zend_Log_FactoryInterface.
getLayoutFormatter | ( | ) |
Gets instance of Zend_Log_Formatter_Instance used for formatting a message using Zend_Layout, if applicable.
setLayout | ( | $layout | ) |
Set the layout.
Zend_Layout | array | $layout |
Zend_Log_Exception |
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. |
Zend_Log_Exception |
shutdown | ( | ) |
Sends mail to recipient(s) if log entries are present.
Note that both plaintext and HTML portions of email are handled here.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |