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


PHP CF7DBPlugin::formatDate方法代码示例

本文整理汇总了PHP中CF7DBPlugin::formatDate方法的典型用法代码示例。如果您正苦于以下问题:PHP CF7DBPlugin::formatDate方法的具体用法?PHP CF7DBPlugin::formatDate怎么用?PHP CF7DBPlugin::formatDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CF7DBPlugin的用法示例。


在下文中一共展示了CF7DBPlugin::formatDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: nextRow

 /**
  * Fetch next row into variable
  * @return bool if next row exists
  */
 public function nextRow()
 {
     if (!$this->results) {
         return false;
     }
     while (true) {
         if (!$this->onFirstRow) {
             $this->row = mysql_fetch_assoc($this->results);
         }
         $this->onFirstRow = false;
         if (!$this->row) {
             mysql_free_result($this->results);
             $this->results = null;
             return false;
         }
         // Format the date
         $submitTime = $this->row['Submitted'];
         $this->row['submit_time'] = $submitTime;
         $this->row['Submitted'] = $this->plugin->formatDate($submitTime);
         // Determine if row is filtered
         if ($this->rowFilter) {
             $match = $this->rowFilter->evaluate($this->row);
             if (!$match) {
                 continue;
             }
         }
         $this->idx += 1;
         if ($this->limitStart && $this->idx < $this->limitStart) {
             continue;
         }
         if ($this->limitEnd && $this->idx >= $this->limitEnd) {
             while (mysql_fetch_array($this->results)) {
             }
             mysql_free_result($this->results);
             $this->results = null;
             $this->row = null;
             return false;
         }
         // Keep the unformatted submitTime if needed
         if ($this->submitTimeKeyName) {
             $this->row[$this->submitTimeKeyName] = $submitTime;
         }
         break;
     }
     if (!$this->row) {
         mysql_free_result($this->results);
         $this->results = null;
     }
     return $this->row ? true : false;
 }
开发者ID:rconnelly,项目名称:vacationware,代码行数:54,代码来源:CFDBQueryResultIterator.php

示例2: nextRow

 /**
  * Fetch next row into variable
  * @return bool if next row exists
  */
 public function nextRow()
 {
     while (true) {
         if (!$this->onFirstRow) {
             $this->row = $this->fetchRow();
         }
         $this->onFirstRow = false;
         if (!$this->row) {
             $this->freeResult();
             return false;
         }
         // Format the date
         if (!isset($this->row['submit_time']) && isset($this->row['Submitted']) && is_numeric($this->row['Submitted'])) {
             $submitTime = $this->row['Submitted'];
             $this->row['submit_time'] = $submitTime;
             $this->row['Submitted'] = $this->plugin->formatDate($submitTime);
         }
         // Determine if row is filtered
         if ($this->rowFilter) {
             $match = $this->rowFilter->evaluate($this->row);
             if (!$match) {
                 continue;
             }
         }
         $this->idx += 1;
         if ($this->limitStart && $this->idx < $this->limitStart) {
             continue;
         }
         if ($this->limitEnd && $this->idx >= $this->limitEnd) {
             while ($this->row = $this->fetchRow()) {
             }
             $this->freeResult();
             $this->row = null;
             return false;
         }
         // Keep the unformatted submitTime if needed
         if (isset($submitTime) && $this->submitTimeKeyName) {
             $this->row[$this->submitTimeKeyName] = $submitTime;
         }
         break;
     }
     if (!$this->row) {
         $this->freeResult();
     }
     return $this->row ? true : false;
 }
开发者ID:ziedbou,项目名称:organic,代码行数:50,代码来源:CFDBAbstractQueryResultsIterator.php


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