本文整理汇总了PHP中LogUtil::getStatusMessages方法的典型用法代码示例。如果您正苦于以下问题:PHP LogUtil::getStatusMessages方法的具体用法?PHP LogUtil::getStatusMessages怎么用?PHP LogUtil::getStatusMessages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LogUtil
的用法示例。
在下文中一共展示了LogUtil::getStatusMessages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateCoreData
/**
* Generate system level payload.
*
* @return array
*/
protected function generateCoreData()
{
$core = array();
if ($this->options) {
foreach ($this->options as $key => $value) {
$core[$key] = $value;
}
}
if ($this->csrfToken) {
$core['authid'] = $this->authid;
$core['token'] = $this->csrfToken;
}
$logUtilMessages = (array)LogUtil::getStatusMessages();
$core['statusmsg'] = array_merge($this->messages,$logUtilMessages);
return $core;
}
示例2: Zikula_Response_Ajax_Forbidden
$response = new Zikula_Response_Ajax_Forbidden($e->getMessage());
} catch (Zikula_Exception_Fatal $e) {
$response = new Zikula_Response_Ajax_Fatal($e->getMessage());
} catch (PDOException $e) {
$response = new Zikula_Response_Ajax_Fatal($e->getMessage());
} catch (Exception $e) {
$response = new Zikula_Response_Ajax_Fatal($e->getMessage());
}
// Handle database transactions
if (System::getVar('Z_CONFIG_USE_TRANSACTIONS')) {
if (isset($e) && $e instanceof Exception) {
$dbConn->rollback();
} else {
$dbConn->commit();
}
}
// Process final response.
// If response is not instanceof Zikula_Response_Ajax_AbstractBase provide compat solution
if (!$response instanceof Zikula_Response_Ajax_AbstractBase) {
$response = !is_array($response) ? array('data' => $response) : $response;
$response['statusmsg'] = LogUtil::getStatusMessages();
if (System::isLegacyMode()) {
$response['authid'] = SecurityUtil::generateAuthKey(ModUtil::getName());
}
$response = json_encode($response);
header("HTTP/1.1 200 OK");
header('Content-type: application/json');
}
// Issue response.
echo $response;
System::shutdown();