File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 44
55use Iterator ;
66
7+ /**
8+ * @template TKey
9+ * @template TValue
10+ *
11+ * @template-implements PaginationInterface<TKey, TValue>
12+ */
713abstract class AbstractPagination implements Iterator, PaginationInterface
814{
915 protected ?int $ currentPageNumber = null ;
Original file line number Diff line number Diff line change 88 * Pagination interface strictly defines
99 * the methods - paginator will use to populate the
1010 * pagination data
11+ *
12+ * @template TKey
13+ * @template TValue
14+ *
15+ * @template-extends Traversable<TKey, TValue>
1116 */
1217interface PaginationInterface extends Countable, Traversable, ArrayAccess
1318{
@@ -32,10 +37,15 @@ public function setTotalItemCount(int $numTotal): void;
3237 */
3338 public function getTotalItemCount (): int ;
3439
40+ /**
41+ * @param iterable<TKey, TValue> $items
42+ */
3543 public function setItems (iterable $ items ): void ;
3644
3745 /**
3846 * Get current items
47+ *
48+ * @return iterable<TKey, TValue>
3949 */
4050 public function getItems (): iterable ;
4151
Original file line number Diff line number Diff line change 88 * @todo: find a way to avoid exposing private member setters
99 *
1010 * Sliding pagination
11+ *
12+ * @template TKey
13+ * @template TValue
14+ *
15+ * @template-extends AbstractPagination<TKey, TValue>
1116 */
1217final class SlidingPagination extends AbstractPagination
1318{
You can’t perform that action at this time.
0 commit comments