本文整理汇总了PHP中FirePHP::throwAssertionExceptions方法的典型用法代码示例。如果您正苦于以下问题:PHP FirePHP::throwAssertionExceptions方法的具体用法?PHP FirePHP::throwAssertionExceptions怎么用?PHP FirePHP::throwAssertionExceptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FirePHP
的用法示例。
在下文中一共展示了FirePHP::throwAssertionExceptions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: registerAssertionHandler
/**
* 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'));
}