예제 #1
0
 /**
  * Sets an fSMTP object to be used for sending error and exception emails
  * 
  * @param  fSMTP  $smtp        The SMTP connection to send emails over
  * @param  string $from_email  The email address to use in the `From:` header
  * @return void
  */
 public static function configureSMTP($smtp, $from_email)
 {
     self::$smtp_connection = $smtp;
     self::$smtp_from_email = $from_email;
 }
예제 #2
0
 /**
  * Resets the configuration of the class
  *
  * @internal
  *
  * @return void
  */
 public static function reset()
 {
     if (self::$handles_errors) {
         restore_error_handler();
     }
     if (self::$handles_exceptions) {
         restore_exception_handler();
     }
     if (is_array(self::$captured_errors)) {
         restore_error_handler();
     }
     self::$captured_error_level = 0;
     self::$captured_error_regex = array();
     self::$captured_error_types = array();
     self::$captured_errors = array();
     self::$captured_errors_previous_handler = array();
     self::$context_shown = FALSE;
     self::$debug = NULL;
     self::$debug_callback = NULL;
     self::$dynamic_constants = FALSE;
     self::$error_destination = 'html';
     self::$error_message_queue = array();
     self::$exception_destination = 'html';
     self::$exception_handler_callback = NULL;
     self::$exception_handler_parameters = array();
     self::$exception_message = NULL;
     self::$handles_errors = FALSE;
     self::$handles_exceptions = FALSE;
     self::$significant_error_lines = array();
     self::$show_context = TRUE;
     self::$smtp_connection = NULL;
     self::$smtp_from_email = NULL;
 }