phpextra / paginator
Pagination for collections in PHP
Installs: 6 781
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- phpextra/collection: ~1.0
Requires (Dev)
- phpunit/phpunit: ~4.2
This package is not auto-updated.
Last update: 2022-02-01 12:38:28 UTC
README
#Paginator (PHPExtra\Paginator)
##Usage
Paginator is fully compatible with Collection (PHPExtra/Collection). It's task is to split large collections into pages.
$page = 2; $itemsPerPage = 10; $products = new Collection(...); $paginator = new Paginator($products, $page, $itemsPerPage); echo $paginator->getPage(); // returns a collection with size of 10 for current page echo $paginator->getNextPageNumber(); // returns "3" echo $paginator->hasNextPage(); // returns bool true or false
##Changelog
No release yet
##Contributing
All code contributions must go through a pull request. Fork the project, create a feature branch, and send me a pull request. To ensure a consistent code base, you should make sure the code follows the coding standards. If you would like to help take a look at the list of issues.
##Requirements
See **composer.json** for a full list of dependencies.
##Authors
Jacek Kobus - <kobus.jacek@gmail.com>
License information
See the file LICENSE.txt for copying permission.