public function listByPage($page, $order = array(), $conditions = null, $per_page = 20) { $page_option = array('curr_page' => max(1, intval($page)), 'total' => $this->count($conditions), 'per_page' => $per_page); FPager::build($page_option); $start = $page_option['start']; $limit = $page_option['per_page']; $results = $this->findAll($conditions, array(), array('*'), $start, $limit, $order); return array('data' => $results, 'page_option' => $page_option); }