예제 #1
0
 public function pagination($RowsPerPage)
 {
     $table = new DBTable($this->table);
     //
     $dbtable = $table->paginate($RowsPerPage);
     //
     //Table::show($dbtable);
     $data = array();
     foreach ($dbtable->data as $key => $value) {
         $row = new self($value[0], $this->table);
         array_push($data, $row);
     }
     //params
     $nbRows = $dbtable->nbRows;
     //
     $collection = new DataCollection($data, true, $dbtable->nbRows, $RowsPerPage, $dbtable->CurrentPage);
     //
     return $collection;
 }