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