phpextra/paginator

This package is abandoned and no longer maintained. No replacement package was suggested.

Pagination for collections in PHP

dev-master / 2.0.x-dev 2014-08-16 20:34 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:38:28 UTC


README

#Paginator (PHPExtra\Paginator)

Latest Stable Version Total Downloads License Build Status Scrutinizer Code Quality Code Coverage GitTip

##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.