whiteoctober / Pagerfanta

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

Concatenation adapter #239

Closed Finesse closed 7 years ago

Finesse commented 7 years ago

I've made a new adapter. It joins the results of adapter instances into a single adapter.

use Pagerfanta\Adapter\ArrayAdapter;
use Pagerfanta\Adapter\ConcatenationAdapter;
use Pagerfanta\Adapter\MongoAdapter;

$adapter = new ConcatenationAdapter(array(
    new ArrayAdapter(array('ad1', 'ad2')),
    new MongoAdapter(/* cursor */)
));
Finesse commented 7 years ago

It considers all the remarks from https://github.com/whiteoctober/Pagerfanta/pull/218, https://github.com/whiteoctober/Pagerfanta/pull/208 and https://github.com/whiteoctober/Pagerfanta/pull/194

Finesse commented 7 years ago

@sampart I’m glad to read your feedback. Thank you!

Finesse commented 7 years ago

@sampart And thank you for supporting Pagerfanta, it’s a great library.

sampart commented 7 years ago

Thanks for the kind words, @FinesseRus (and for your contributions!)