setPageLimit() & getPageLimit()
Sets or retrieves the maximum number of rows returned per page for paginated queries.
This replaces the legacy $db->pageLimit
property and is fully instance-safe.
Signatures:
public function setPageLimit(int $limit): self
public function getPageLimit(): int
Example: Set and read page limit
// Limit result to 23 entries per page
$db->setPageLimit(23);
// Later retrieve it
$currentLimit = $db->getPageLimit();
Deprecated: The use of
$db->pageLimit
is deprecated and will be removed in v1.5.x
.
Why was
The property
The new
pageLimit
deprecated?The property
$db->pageLimit
used static storage, making it unsafe when working with multiple database instances.The new
setPageLimit()
and getPageLimit()
methods are fully instance-safe.