当前位置: 首页>>代码示例>>PHP>>正文


PHP Localization::bindReplacePlaceholder方法代码示例

本文整理汇总了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'];
开发者ID:adartk,项目名称:phpsqlitecms,代码行数:31,代码来源:content.inc.php


注:本文中的Localization::bindReplacePlaceholder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。