當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tool::objDate方法代碼示例

本文整理匯總了PHP中Tool::objDate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tool::objDate方法的具體用法?PHP Tool::objDate怎麽用?PHP Tool::objDate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Tool的用法示例。


在下文中一共展示了Tool::objDate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setObject

 private function setObject(&$_object)
 {
     if ($_object) {
         Tool::subStr($_object, 'title', 14, 'utf-8');
         Tool::objDate($_object, 'date');
     }
 }
開發者ID:denson7,項目名稱:phpstudy,代碼行數:7,代碼來源:ListAction.class.php

示例2: showList

 public function showList()
 {
     parent::__construct($this->_tpl, new ContentModel());
     $_object = $this->_model->getNewRecList();
     Tool::subStr($_object, 'title', 30);
     Tool::objDate($_object, 'date');
     $this->_tpl->assign('NewRecList', $_object);
     $_object = $this->_model->getMonthHotList();
     Tool::subStr($_object, 'title', 30);
     Tool::objDate($_object, 'date');
     $this->_tpl->assign('MonthHotList', $_object);
     $_object = $this->_model->getMonthCommentList();
     Tool::subStr($_object, 'title', 30);
     Tool::objDate($_object, 'date');
     $this->_tpl->assign('MonthCommentList', $_object);
     $_object = $this->_model->getPicList();
     Tool::subStr($_object, 'title', 20);
     Tool::objDate($_object, 'date');
     $this->_tpl->assign('PicList', $_object);
     $_object = $this->_model->getNewList();
     Tool::subStr($_object, 'title', 50);
     Tool::objDate($_object, 'date');
     $this->_tpl->assign('NewList', $_object);
     $_object = $this->_model->getNewTop();
     $this->_tpl->assign('TopTitle', Tool::subStr($_object->title, null, 30));
     $this->_tpl->assign('TopInfo', Tool::subStr($_object->info, null, 130));
     $this->_tpl->assign('TopId', $_object->id);
     $_object = $this->_model->getNewTopList();
     Tool::subStr($_object, 'title', 30);
     Tool::objDate($_object, 'date');
     if ($_object) {
         $_i = 1;
         foreach ($_object as $_value) {
             if ($_i % 2 == 0) {
                 $_value->line = '';
             } else {
                 $_value->line = '|';
             }
             $_i++;
         }
     }
     $this->_tpl->assign('NewTopList', $_object);
     $_nav = new NavModel();
     $_object = $_nav->getFourNav();
     if ($_object) {
         $_i = 1;
         foreach ($_object as $_value) {
             if ($_i % 2 == 0) {
                 $_value->class = "list right bottom";
             } else {
                 $_value->class = "list bottom";
             }
             $_i++;
             $this->_model->nav = $_value->id;
             $_navList = $this->_model->getNewNavList();
             Tool::subStr($_navList, 'title', 40);
             Tool::objDate($_navList, 'date');
             $_value->list = $_navList;
         }
     }
     $this->_tpl->assign('FourNav', $_object);
 }
開發者ID:e0zhao02,項目名稱:sample_code,代碼行數:62,代碼來源:IndexAction.class.php


注:本文中的Tool::objDate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。