Permalink
Browse files

MINOR Fixed SS_LogEmailWriter and SS_LogFileWriter to adhere to new Z…

…end interface
  • Loading branch information...
1 parent 9434f87 commit f11751c42dd0050ee5803265ade04b92c7c1815a @chillu chillu committed May 30, 2011
Showing with 8 additions and 0 deletions.
  1. +4 −0 dev/LogEmailWriter.php
  2. +4 −0 dev/LogFileWriter.php
View
4 dev/LogEmailWriter.php
@@ -24,6 +24,10 @@ public function __construct($emailAddress, $customSmtpServer = false) {
$this->emailAddress = $emailAddress;
$this->customSmtpServer = $customSmtpServer;
}
+
+ static function factory($emailAddress, $customSmtpServer = false) {
+ return new SS_LogEmailWriter($emailAddress, $customSmtpServer);
+ }
public static function set_send_from($address) {
self::$send_from = $address;
View
4 dev/LogFileWriter.php
@@ -43,6 +43,10 @@ public function __construct($path, $messageType = 3, $extraHeaders = '') {
$this->messageType = $messageType;
$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

0 comments on commit f11751c

Please sign in to comment.