thingston / paginator
PHP paginator class for any suitable source of data using custom adapters.
0.1.0
2019-11-10 15:47 UTC
Requires
- php: ^7.1
Requires (Dev)
- phpunit/phpunit: ^8.4
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-12-11 03:34:45 UTC
README
PHP paginator class for any suitable source of data using custom adapters.
use Thingston\Paginator\Adapter\ArrayAdapter; use Thingston\Paginator\Paginator; $adapter = new ArrayAdapter([...]); $paginator = new Paginator($adapter); $paginator->setItemsPerPage(50)->setCurrentPage(2); foreach ($paginator as $item) { // print item details }