コード例 #1
0
ファイル: FirePHP.php プロジェクト: rgnevashev/firephp
 /**
  * Register FirePHP driver as your assert callback
  * 
  * @param boolean $convertAssertionErrorsToExceptions
  * @param boolean $throwAssertionExceptions
  * @return mixed Returns the original setting or FALSE on errors
  */
 public function registerAssertionHandler($convertAssertionErrorsToExceptions = true, $throwAssertionExceptions = false)
 {
     self::$convertAssertionErrorsToExceptions = $convertAssertionErrorsToExceptions;
     self::$throwAssertionExceptions = $throwAssertionExceptions;
     if ($throwAssertionExceptions && !$convertAssertionErrorsToExceptions) {
         throw new Exception('Cannot throw assertion exceptions as assertion errors are not being converted to exceptions!');
     }
     return assert_options(ASSERT_CALLBACK, array($this, 'assertionHandler'));
 }