whiteoctober / Pagerfanta

Pagination for PHP.
Other
1.59k stars 2 forks source link

Implement a combined adapter #285

Closed mikemeier closed 4 years ago

mikemeier commented 4 years ago

We needed a pagination over multiple sources. This adapter should solve this use case.

stof commented 4 years ago

what is the difference between that adapter and the existing ConcatenationAdapter which already solves that use case AFAIK ?

mikemeier commented 4 years ago

Hmm, sorry for that. My current used version of pagerfanta did not have such an adapter. Maybe we could replace the code with the one I provided, since I think it's more readable and using yield instead of adding a new array to memory. But it can also be closed if its not worth the effort :-)

stof commented 4 years ago

I don't think it is worth the effort, especially given that maintainers are not really active anymore.

Btw, I see now reason why your adapter has a getAdapters method exposing its internal details.

mikemeier commented 4 years ago

I also did not see why ArrayAdapter has a getArray method, I just tried to be as close as possible to the other adapters