lithium\data\model\Query::page()
Set and get method for page, in relation to limit, of which records to get
Parameters
-
integer|null
$page
Returns
integer|\lithium\data\QuerySource
public function page($page = null) {
if ($page) {
$this->_config['page'] = $page = ((integer) $page ?: 1);
$this->offset(($page - 1) * $this->_config['limit']);
return $this;
}
return $this->_config['page'];
}