/**
  * Initialise will set the error handler to be the `__CLASS__::handler`
  * function.
  *
  * @param Log|null $Log (optional)
  *  An instance of a Symphony Log object to write errors to
  */
 public static function initialise(Log $Log = null)
 {
     if (!is_null($Log)) {
         self::$_Log = $Log;
     }
     set_error_handler(array(__CLASS__, 'handler'), error_reporting());
 }
예제 #2
0
 public static function initialise(Log $Log = NULL)
 {
     self::$enabled = true;
     self::$_enabledErrorTypes = NULL;
     if (!is_null($Log)) {
         self::$_Log = $Log;
     }
     set_error_handler(array(__CLASS__, 'handler'));
 }
예제 #3
0
 /**
  * Initialise will set the error handler to be the `__CLASS__` handler
  * function and will set this `$_Log` variable to a Log instance
  *
  * @param Log|null $Log (optional)
  *  An instance of a Symphony Log object to write errors to
  * @param string $raise
  *  Whether to raise E_WARNING as an Exception
  */
 public static function initialise(Log $Log = null, $raise = false)
 {
     if (!is_null($Log)) {
         self::$_Log = $Log;
     }
     self::$raise = $raise == 'yes' ? true : false;
     set_error_handler(array(__CLASS__, 'handler'), error_reporting());
 }