本文整理汇总了PHP中Timestamp::getHumanReadable方法的典型用法代码示例。如果您正苦于以下问题:PHP Timestamp::getHumanReadable方法的具体用法?PHP Timestamp::getHumanReadable怎么用?PHP Timestamp::getHumanReadable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timestamp
的用法示例。
在下文中一共展示了Timestamp::getHumanReadable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFormattedList
public function getFormattedList($conditions)
{
//data [array(id, blogid, category, content,
$data = $this->getWithConditions($conditions);
$view = '';
foreach ($data as $d) {
$template = $conditions['template'];
$d['created'] = Timestamp::getHumanReadable($d['created']);
if ($d['root'] == 'default') {
$d['root'] = 'Textcube Line';
}
foreach ($conditions['dress'] as $tag => $match) {
dress($tag, $d[$match], $template);
}
$view .= $template;
}
return $view;
}
示例2: requireStrictRoute
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
$conditions = array();
$conditions['blogid'] = getBlogId();
$conditions['page'] = $_POST['page'];
if (isset($_POST['category'])) {
$conditions['category'] = $_POST['category'];
}
if (isset($_POST['keyword'])) {
$conditions['keyword'] = $_POST['keyword'];
}
$conditions['linesforpage'] = $_POST['lines'];
$skin = new Skin($context->getProperty('skin.skin'));
$line = Model_Line::getInstance();
$stream = $line->getWithConditions($conditions);
$contentView = '';
foreach ($stream as $item) {
$time = Timestamp::getHumanReadable($item['created']);
if ($item['root'] == 'default') {
$item['root'] = 'Textcube Line';
}
$contentView .= str_replace(array('[##_line_rep_regdate_##]', '[##_line_rep_content_##]', '[##_line_rep_author_##]', '[##_line_rep_source_##]', '[##_line_rep_permalink_##]'), array(fireEvent('ViewLineDate', $time, $item['created']), fireEvent('ViewLineContent', $item['content']), fireEvent('ViewLineAuthor', htmlspecialchars($item['author'])), fireEvent('ViewLineSource', htmlspecialchars($item['root'])), fireEvent('ViewLinePermalink', $item['permalink'])), $skin->lineItem);
}
if (empty($stream)) {
$contentView = '';
$buttonView = '';
} else {
$buttonView = str_replace(array('[##_line_onclick_more_##]'), array('getMoreLineStream(' . ($conditions['page'] + 1) . ',' . $conditions['linesforpage'] . ',\'bottom\');return false;'), $skin->lineButton);
}
$result = array('error' => 0, 'contentView' => $contentView, 'buttonView' => $buttonView);
Respond::PrintResult($result);