本文整理匯總了PHP中Tracy\Helpers::isAjax方法的典型用法代碼示例。如果您正苦於以下問題:PHP Helpers::isAjax方法的具體用法?PHP Helpers::isAjax怎麽用?PHP Helpers::isAjax使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tracy\Helpers
的用法示例。
在下文中一共展示了Helpers::isAjax方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: errorHandler
/**
* Handler to catch warnings and notices.
* @return bool FALSE to call normal error handler, NULL otherwise
* @throws ErrorException
* @internal
*/
public static function errorHandler($severity, $message, $file, $line, $context)
{
if (self::$scream) {
error_reporting(E_ALL);
}
if ($severity === E_RECOVERABLE_ERROR || $severity === E_USER_ERROR) {
if (Helpers::findTrace(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), '*::__toString')) {
$previous = isset($context['e']) && ($context['e'] instanceof \Exception || $context['e'] instanceof \Throwable) ? $context['e'] : NULL;
$e = new ErrorException($message, 0, $severity, $file, $line, $previous);
$e->context = $context;
self::exceptionHandler($e);
}
$e = new ErrorException($message, 0, $severity, $file, $line);
$e->context = $context;
throw $e;
} elseif (($severity & error_reporting()) !== $severity) {
return FALSE;
// calls normal error handler to fill-in error_get_last()
} elseif (self::$productionMode && ($severity & self::$logSeverity) === $severity) {
$e = new ErrorException($message, 0, $severity, $file, $line);
$e->context = $context;
Helpers::improveException($e);
try {
self::log($e, self::ERROR);
} catch (\Throwable $e) {
} catch (\Exception $foo) {
}
return NULL;
} elseif (!self::$productionMode && !isset($_GET['_tracy_skip_error']) && (is_bool(self::$strictMode) ? self::$strictMode : (self::$strictMode & $severity) === $severity)) {
$e = new ErrorException($message, 0, $severity, $file, $line);
$e->context = $context;
$e->skippable = TRUE;
self::exceptionHandler($e);
}
$message = 'PHP ' . Helpers::errorTypeToString($severity) . ": {$message}";
$count =& self::getBar()->getPanel('Tracy:errors')->data["{$file}|{$line}|{$message}"];
if ($count++) {
// repeated error
return NULL;
} elseif (self::$productionMode) {
try {
self::log("{$message} in {$file}:{$line}", self::ERROR);
} catch (\Throwable $e) {
} catch (\Exception $foo) {
}
return NULL;
} else {
self::fireLog(new ErrorException($message, 0, $severity, $file, $line));
return Helpers::isHtmlMode() || Helpers::isAjax() ? NULL : FALSE;
// FALSE calls normal error handler
}
}