diff --git a/src/Model/SimplePaginatedList.php b/src/Model/SimplePaginatedList.php index 6f33e62..acbd2ca 100644 --- a/src/Model/SimplePaginatedList.php +++ b/src/Model/SimplePaginatedList.php @@ -84,4 +84,19 @@ public function count() return $this->totalRecordCount; } + + /** + * Mutate the pagination limit + * + * @param int $limit Maximum number of items per page (0 - 100) + * @throws \RuntimeException + */ + public function setPaginationLimit($limit) + { + if ($limit < 0 || $limit > 100) { + throw new RuntimeException('Invalid limit value (0 - 100): '.$limit); + } + $this->limit = $limit; + } + }