本文整理汇总了PHP中KunenaError::debug方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaError::debug方法的具体用法?PHP KunenaError::debug怎么用?PHP KunenaError::debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KunenaError
的用法示例。
在下文中一共展示了KunenaError::debug方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
public static function initialize() {
if (!self::$enabled) {
self::$debug = JDEBUG || KunenaFactory::getConfig ()->debug;
self::$admin = JFactory::getApplication()->isAdmin() || KunenaUserHelper::getMyself()->isAdmin();
register_shutdown_function(array('KunenaError', 'shutdownHandler'), self::$debug || self::$admin || KUNENA_PROFILER);
if (!self::$debug) return;
@ini_set('display_errors', 1);
self::$handler = true;
@error_reporting(E_ALL | E_STRICT);
JFactory::getDbo()->setDebug(true);
set_error_handler(array('KunenaError', 'errorHandler'));
self::$enabled++;
}
}
示例2: initialize
public static function initialize()
{
if (!self::$enabled) {
self::$debug = JDEBUG || KunenaFactory::getConfig()->debug;
self::$admin = JFactory::getApplication()->isAdmin() || KunenaUserHelper::getMyself()->isAdmin();
register_shutdown_function('kunenaShutdownHandler', self::$debug || self::$admin || KUNENA_PROFILER);
if (!self::$debug) {
return;
}
@ini_set('display_errors', 1);
self::$handler = true;
if (version_compare(JVERSION, '1.7', '>')) {
// Joomla 1.7+
@error_reporting(E_ALL & ~E_STRICT);
JFactory::getDBO()->setDebug(true);
} else {
// Joomla 1.5 and 1.6
@error_reporting(E_ALL & ~E_STRICT);
JFactory::getDBO()->debug(1);
}
set_error_handler('kunenaErrorHandler');
self::$enabled++;
}
}