本文整理匯總了PHP中FirePHP::convertAssertionErrorsToExceptions方法的典型用法代碼示例。如果您正苦於以下問題:PHP FirePHP::convertAssertionErrorsToExceptions方法的具體用法?PHP FirePHP::convertAssertionErrorsToExceptions怎麽用?PHP FirePHP::convertAssertionErrorsToExceptions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FirePHP
的用法示例。
在下文中一共展示了FirePHP::convertAssertionErrorsToExceptions方法的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'));
}