Model::current
Set Current Page Parameter
Description
public self Model::current( [ number $current = 1 ] )
Arguments
Name | Data type | Default | Remarks |
---|---|---|---|
$current | number | 1 | Current page number |
Example
Controller
$model = new Model(false, array(
'table' => 'cms_news',
'id' => 'news_id',
'visible' => 'visible',
));
// Get 2nd page's 5 records
$records = $model->listMax(5)->current(2)->find();