本文整理汇总了PHP中EventLog::load方法的典型用法代码示例。如果您正苦于以下问题:PHP EventLog::load方法的具体用法?PHP EventLog::load怎么用?PHP EventLog::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventLog
的用法示例。
在下文中一共展示了EventLog::load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index($option)
{
$rows = $this->getRows();
$events = array();
foreach ($rows as $id) {
$row = new EventLog();
$row->load($id);
$events[$id] = new stdClass();
$events[$id]->id = $row->id;
$events[$id]->datetime = $row->datetime;
$events[$id]->short = $row->short;
$events[$id]->tags = implode(', ', explode(',', $row->tags));
$events[$id]->event = $row->event;
$events[$id]->level = $row->level;
$events[$id]->notify = $row->notify;
$params = array();
if (!empty($row->params) && is_array($row->params)) {
foreach ($row->params as $key => $value) {
switch ($key) {
case 'userid':
$content = '<a href="index.php?option=com_acctexp&task=edit&entity=Membership&userid=' . $value . '">' . $value . '</a>';
break;
case 'invoice_number':
$content = '<a class="quicksearch" href="#">' . $value . '</a>';
break;
default:
$content = $value;
break;
}
$params[] = $key . '(' . $content . ')';
}
}
$events[$id]->params = implode(', ', $params);
if (strpos($row->event, '<?xml') !== false) {
$events[$id]->event = '<p><strong>XML cell - decoded as:</strong></p><pre class="prettyprint">' . htmlentities($row->event) . '</pre>';
} else {
$format = @json_decode($row->event);
if (is_array($format) || is_object($format)) {
$events[$id]->event = '<p><strong>JSON cell - decoded as:</strong></p><pre class="prettyprint">' . print_r($format, true) . '</pre>';
} else {
$events[$id]->event = htmlentities(stripslashes($events[$id]->event));
}
}
}
HTML_AcctExp::eventlog($events, $this->getPagination(), $this->getState());
}