MINOR Fixed SS_LogEmailWriter and SS_LogFileWriter to adhere to new Zend interface

This commit is contained in:
Ingo Schommer 2011-05-30 21:30:32 +12:00
parent 9434f87cb9
commit f11751c42d
2 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,10 @@ class SS_LogEmailWriter extends Zend_Log_Writer_Abstract {
$this->customSmtpServer = $customSmtpServer; $this->customSmtpServer = $customSmtpServer;
} }
static function factory($emailAddress, $customSmtpServer = false) {
return new SS_LogEmailWriter($emailAddress, $customSmtpServer);
}
public static function set_send_from($address) { public static function set_send_from($address) {
self::$send_from = $address; self::$send_from = $address;
} }

View File

@ -44,6 +44,10 @@ class SS_LogFileWriter extends Zend_Log_Writer_Abstract {
$this->extraHeaders = $extraHeaders; $this->extraHeaders = $extraHeaders;
} }
static function factory($path, $messageType = 3, $extraHeaders = '') {
return new SS_LogFileWriter($path, $messageType, $extraHeaders);
}
/** /**
* Write the log message to the file path set * Write the log message to the file path set
* in this writer. * in this writer.