當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。