本文整理汇总了PHP中Localization::bindReplacePlaceholder方法的典型用法代码示例。如果您正苦于以下问题:PHP Localization::bindReplacePlaceholder方法的具体用法?PHP Localization::bindReplacePlaceholder怎么用?PHP Localization::bindReplacePlaceholder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Localization
的用法示例。
在下文中一共展示了Localization::bindReplacePlaceholder方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
$dbr->execute();
$include_news_page_data = $dbr->fetch();
if (isset($include_news_page_data['page'])) {
if ($include_news_page_data['type'] == 'simple_news') {
$dbr = Database::$content->prepare("SELECT id, time, title, teaser, text, text_formatting, linkname FROM " . Database::$db_settings['news_table'] . " WHERE page_id=:page_id ORDER BY time DESC LIMIT " . $settings['include_news_items']);
} else {
$dbr = Database::$content->prepare("SELECT id, time, teaser_headline, headline, title, page_title, page, teaser, content, link_name AS linkname FROM " . Database::$db_settings['pages_table'] . " WHERE include_page=:page_id ORDER BY time DESC LIMIT " . $settings['include_news_items']);
}
$dbr->bindParam(':page_id', $data['include_news'], PDO::PARAM_INT);
$dbr->execute();
$i = 0;
while ($include_news_data = $dbr->fetch()) {
$include_news[$i]['id'] = $include_news_data['id'];
$include_news[$i]['time'] = $include_news_data['time'];
$include_news[$i]['linkname'] = $include_news_data['linkname'];
$localization->bindReplacePlaceholder($include_news_data['id'], 'time', $include_news_data['time'], 'include_news_time', Localization::FORMAT_TIME);
if ($include_news_page_data['type'] == 'simple_news') {
$include_news[$i]['title'] = $include_news_data['title'];
if ($include_news_data['teaser']) {
$include_news[$i]['teaser'] = $include_news_data['teaser'];
} else {
if ($include_news_data['text_formatting'] == 1) {
$include_news[$i]['teaser'] = auto_html($include_news_data['text']);
} else {
$include_news[$i]['teaser'] = $include_news_data['text'];
}
}
$include_news[$i]['link'] = BASE_URL . $include_news_page_data['page'] . ',' . $include_news_data['id'];
} else {
if ($include_news_data['teaser_headline'] != '') {
$include_news[$i]['title'] = $include_news_data['teaser_headline'];