本文整理汇总了PHP中Activity::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Activity::get方法的具体用法?PHP Activity::get怎么用?PHP Activity::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Activity
的用法示例。
在下文中一共展示了Activity::get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get
function get($criteria = null)
{
$user = current_user();
$projects = new Project();
$activity = new Activity();
$this->projects = $projects->get();
$this->activity = $activity->get();
}
示例2: Activity
function do_index()
{
$MAX = 200;
$activities = new Activity();
$activities->order_by('created desc');
$activities->limit(100);
$activities = $activities->get();
// Keep number of records from growing unbounded
if ($activities->count() > $MAX) {
$toDelete = new Activity();
$toDelete->order_by('created desc');
$toDelete->limit($MAX, $MAX / 2);
$toDelete->get();
$toDelete->delete_all();
}
$this->template->write_view('content', 'activities/index', array('activities' => $activities));
$this->template->render();
}
示例3: Activity
function get_activity()
{
$activity = new Activity();
return $activity->get('WHERE project_id = ' . $this->id);
}