本文整理汇总了PHP中FB::registerErrorHandler方法的典型用法代码示例。如果您正苦于以下问题:PHP FB::registerErrorHandler方法的具体用法?PHP FB::registerErrorHandler怎么用?PHP FB::registerErrorHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FB
的用法示例。
在下文中一共展示了FB::registerErrorHandler方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onAfterInitialise
/**
* onAfterInitialise handler
*
* Register FirePHP libraries and set options according to paramters
*
* @access public
* @return null
*/
public function onAfterInitialise()
{
require_once 'jfirephp' . DS . 'firephpcore' . DS . 'fb.php';
// JFirePHP is installed and loaed
define('JFIREPHP', 1);
// Before doing any checks lets disable logging
FB::setEnabled(false);
// Check if the integration is set to enabled
$enable = (bool) $this->params->get('enable', 0);
// Only turn on if enabled
if ($enable) {
// if limited to debug mode, check JDEBUG
$limittodebug = (bool) $this->params->get('limittodebug', 1);
if ($limittodebug == false || JDEBUG) {
// We are enabled and either in Debug mode, or it does not matter
FB::setEnabled(true);
$verbose = (bool) $this->params->get('verbose', 0);
if ($verbose) {
FB::group('JFirePHP Startup', array('Collapsed' => true, 'Color' => '#FF4000'));
FB::log('JFirePHP enabled! - Verbose Output Mode: ON');
}
$options = array('maxObjectDepth' => intval($this->params->get('maxObjectDepth', 10)), 'maxArrayDepth' => intval($this->params->get('maxArrayDepth', 20)), 'useNativeJsonEncode' => intval($this->params->get('useNativeJsonEncode', 1)), 'includeLineNumbers' => intval($this->params->get('includeLineNumbers', 1)));
FB::setOptions($options);
if ($verbose) {
FB::log('JFirePHP: Options Set - maxObjectDepth:' . $options['maxObjectDepth'] . ' maxArrayDepth:' . $options['maxArrayDepth'] . ' useNativeJsonEncode:' . $options['useNativeJsonEncode'] . ' includeLineNumbers:' . $options['includeLineNumbers']);
}
$redirectphp = (bool) $this->params->get('redirectphp', 0);
if ($redirectphp) {
// Convert E_WARNING, E_NOTICE, E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE and
// E_RECOVERABLE_ERROR errors to ErrorExceptions and send all Exceptions to Firebug automatically
FB::registerErrorHandler(true);
FB::registerExceptionHandler();
FB::registerAssertionHandler(true, false);
if ($verbose) {
FB::log('JFirePHP: E_WARNING, E_NOTICE, E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE and E_RECOVERABLE_ERROR redirected.');
}
}
if ($verbose) {
FB::groupEnd();
}
}
}
}