Ordog23

Untitled

Jan 14th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1.     public function get_list($start = null) {
  2.         if ($start == NULL) {
  3.             $offset = 0;
  4.         } else {
  5.             $offset = $start * 30;
  6.         }
  7.         $books = array();
  8.         $book = Model_Book::query()->limit(30)->offset($offset)->get();
  9.         foreach ($book as $b) {
  10.             \Arr::insert($books, $b, 0);
  11.         }
  12.         return $books;
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment