本文整理汇总了PHP中Kurogo::getArrayForRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP Kurogo::getArrayForRequest方法的具体用法?PHP Kurogo::getArrayForRequest怎么用?PHP Kurogo::getArrayForRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kurogo
的用法示例。
在下文中一共展示了Kurogo::getArrayForRequest方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: log
public function log($priority, $message, $area, $backTrace = null)
{
if (!self::isValidPriority($priority)) {
throw new Exception("Invalid logging priority {$priority}");
}
if (!preg_match("/^[a-z0-9_-]+\$/i", $area)) {
throw new Exception("Invalid area {$area}");
}
//don't log items above the current logging level
$loggingLevel = isset($this->areaLevel[$area]) ? $this->areaLevel[$area] : $this->defaultLevel;
if ($priority > $loggingLevel) {
return;
}
if (!$backTrace) {
$backTrace = debug_backtrace();
}
$compactTrace = self::compactTrace($backTrace);
if (isset($_SERVER['REQUEST_URI'])) {
$request = $_SERVER['REQUEST_URI'];
} elseif (defined('KUROGO_SHELL')) {
$request = json_encode(Kurogo::getArrayForRequest());
} else {
$request = null;
}
$content = sprintf("%s\t%s:%s\t%s\t%s\t%s", date(Kurogo::getSiteVar('LOG_DATE_FORMAT')), $area, self::priorityToString($priority), $compactTrace, $request, $message) . PHP_EOL;
self::fileAppend($this->logFile, $content);
}
示例2: getErrorURL
/**
*/
function getErrorURL($exception, $devError = false)
{
if (!defined('URL_PREFIX')) {
return false;
//the error occurred VERY early in the init process
}
$args = array_merge(array('code' => $exception instanceof KurogoException ? $exception->getCode() : 'internal'), Kurogo::getArrayForRequest());
if ($devError) {
$args['error'] = $devError;
}
return URL_PREFIX . 'error/?' . http_build_query($args);
}
示例3: getErrorURL
/**
*/
function getErrorURL($exception, $devError = false)
{
if (!defined('URL_PREFIX')) {
return false;
//the error occurred VERY early in the init process
}
$requestArgs = Kurogo::getArrayForRequest();
$args = array_merge(array('code' => $exception instanceof KurogoException ? $exception->getCode() : 'internal'), $requestArgs);
if (array_key_exists(WebModule::AJAX_PARAMETER, $requestArgs['args'])) {
$args[WebModule::AJAX_PARAMETER] = $requestArgs['args'][WebModule::AJAX_PARAMETER];
}
if ($devError) {
$args['error'] = $devError;
}
return URL_PREFIX . 'error/?' . http_build_query($args);
}