BabDev / Pagerfanta

Pagination library for PHP applications with support for several data providers
Other
381 stars 170 forks source link

Allow to setCurrentPageOffsetStart() and setCurrentPageOffsetEnd() #17

Open I-Valchev opened 4 years ago

I-Valchev commented 4 years ago

I have paginated iterable, say split in 5 items per page.

I want to be able to setCurrentPageOffsetStart() to, 2, for example. That way when I iterate over the items, I get item 3 to 5.

Similarly, I want to setCurrentPageOffsetEnd() to 4, for example, to iterate between the currentPageOffsetStart and currentPageOffsetEnd.

stof commented 8 months ago

I fail to see the use case for that. Using arbitrary offsets does not match the concept of pages anymore.

If you want to retrieve arbitrary slices of data, this is possible by using the AdapterInterface directly instead of wrapping it in a Pagerfanta object.