public function limit($limit = null) { if ($limit === null) { return $this->limit; } $this->limit = (int) $limit; return $this; }