当前位置: 首页>>代码示例>>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;未经允许,请勿转载。