本文整理匯總了PHP中Thread::getAttributes方法的典型用法代碼示例。如果您正苦於以下問題:PHP Thread::getAttributes方法的具體用法?PHP Thread::getAttributes怎麽用?PHP Thread::getAttributes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Thread
的用法示例。
在下文中一共展示了Thread::getAttributes方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: index
public function index()
{
$page = Param::get('page', self::FIRST_PAGE);
$sort_method = Param::get('sort', 'created');
$user_id = get_authenticated_user_id($_SESSION['userid']);
$pagination = new SimplePagination($page, self::MAX_THREADS_PER_PAGE);
$threads = Thread::getAll($pagination->start_index - 1, $pagination->count + 1, $sort_method);
$pagination->checkLastPage($threads);
Thread::getAttributes($threads, $user_id);
$trending_threads = Comment::getTrending();
Thread::getTrendTitle($trending_threads);
$total = Thread::countAll();
$pages = ceil($total / self::MAX_THREADS_PER_PAGE);
$this->set(get_defined_vars());
}
示例2: getCreatedThreads
public function getCreatedThreads($session_user)
{
$this->threads_created = Thread::getByUserId($this->id);
Thread::getAttributes($this->threads_created, $session_user);
}