lithium\data\model\Query::page()

public method

Set and get method for page, in relation to limit, of which records to get

Parameters

  • integer|null $page

Returns

integer|\lithium\data\Query

Source

	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'];
	}