public function __construct($totalCount, $limit, $currentPage) { $this->totalCount = $totalCount; $this->limit = $limit; $this->currentPage = max(1, $currentPage); }