public static function setMailer($mailer) { if (is_null($mailer)) { $mailer = self::getDefaultMailer(); } self::$mailer = $mailer; }