本文整理匯總了PHP中ContentModel::viewRating方法的典型用法代碼示例。如果您正苦於以下問題:PHP ContentModel::viewRating方法的具體用法?PHP ContentModel::viewRating怎麽用?PHP ContentModel::viewRating使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ContentModel
的用法示例。
在下文中一共展示了ContentModel::viewRating方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: home
public static function home()
{
require_once 'Goals.model.php';
require_once 'Content.model.php';
$contentMdl = new ContentModel();
$data = array('templates' => array('header.html', 'menu.html', 'searchForm.html', 'content.html', 'footer.html'), 'content' => $contentMdl->viewContent(), 'userID' => $_SESSION['userID'], 'user' => $_SESSION['username'], 'userLevel' => $_SESSION['userLevel'], 'viewRating' => $contentMdl->viewRating());
return $data;
}
示例2: view
public static function view($url_parts)
{
//method returns what templates to load and some twig variables for index.html and the templates to read.
require_once 'Content.model.php';
require_once 'Goals.model.php';
$contentMdl = new ContentModel();
$goalsMdl = new GoalsModel();
$id = $url_parts[0];
$data = array('templates' => array('header.html', 'menu.html', 'searchForm.html', 'singleContent.html', 'footer.html'), 'goals' => $goalsMdl->viewGoals($_SESSION['userID']), 'article' => $contentMdl->viewSingleContent($id), 'userLevel' => $_SESSION['userLevel'], 'user' => $_SESSION['username'], 'userID' => $_SESSION['userID'], 'viewRating' => $contentMdl->viewRating());
return $data;
}