public function setPage(int $page = 1): Select
    {
        if (!$this->limit) {
            throw new DbException('Please setup limit for use method `setPage`');
        }
        $this->offset = $this->limit * ($page - 1);
        return $this;
    }
public function setPage(int $page = 1): Select
    {
        if (!$this->limit) {
            throw new DbException('Please setup limit for use method `setPage`');
        }
        $this->offset = $this->limit * ($page - 1);
        return $this;
    }
public function setPage ( int $ page = 1 ) : Select { if ( ! $ this -> limit ) { throw new DbException ( 'Please setup limit for use method `setPage`' ) ; } $ this -> offset = $ this -> limit * ( $ page - 1 ) ; return $ this ; }
Setup offset like a page number, start from 1

@param  integer $page

@return Select
@throws DbException
Setup offset like a page number start from 1