本文整理匯總了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);
}