本文整理汇总了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');
}
}
示例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);
}