本文整理汇总了PHP中NewsModel::dispose方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsModel::dispose方法的具体用法?PHP NewsModel::dispose怎么用?PHP NewsModel::dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsModel
的用法示例。
在下文中一共展示了NewsModel::dispose方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
function load()
{
parent::load();
if (intval($this->data['new_gnews']) == 0 || $this->player->isSpy) {
$this->redirect('village1.php');
return null;
}
$m = new NewsModel();
$this->siteNews = $m->getGlobalSiteNews();
$m->dispose();
}
示例2: load
public function load()
{
parent::load();
if (intval($this->data['new_gnews']) == 0 || $this->player->isSpy) {
$this->redirect("village1.php");
} else {
$m = new NewsModel();
$this->siteNews = $m->getGlobalSiteNews();
$m->dispose();
}
}
示例3: load
public function load()
{
parent::load();
if ($this->data['player_type'] != PLAYERTYPE_ADMIN) {
exit(0);
} else {
$m = new NewsModel();
$this->saved = FALSE;
if ($this->isPost() && isset($_POST['news'])) {
$this->siteNews = $_POST['news'];
$this->saved = TRUE;
$m->setGlobalPlayerNews($this->siteNews);
} else {
$this->siteNews = $m->getGlobalSiteNews();
}
$m->dispose();
}
}