public function setPage($page = 1) { if ($page < 1) { throw new GridException('Wrong page number, should be greater than zero'); } $this->page = (int) $page; }