Actions
Feature #106764
openChange Paginator pre-calculated getters from protected to public, to make the API more useful
Status:
New
Priority:
Should have
Assignee:
-
Category:
Code Cleanup
Target version:
-
Start date:
2025-05-26
Due date:
% Done:
0%
Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
The AbstractPaginator
has this:
abstract protected function getTotalAmountOfItems(): int;
abstract protected function getAmountOfItemsOnCurrentPage(): int;
I regularly need this information to be displayed/evaluated. And because they are currently protected
I can not retrieve them from the Paginators, but for example have to fire an additional SQL count(*)
query to get the total count or pass the already-counted paginatedItems
through f:count()
again. Or needing to write a copy-paste custom paginator having custom copy-paste (but public
) getters just for these already-existing values - which is cumbersome (the core-provided Paginators are even final
...) and does not feel right.
There's no reason to make these side-effect-free pure information-getter methods protected
. Please make them public
.
Actions