A simple pagination provider for Silex
- PHP >= 5.3.3
$app->register(new \Kilte\Silex\Pagination\PaginationServiceProvider);
$pages = $app['pagination'](100, 500);
More information available here
'pagination.per_page'
- Items per page (20 by default)'pagination.neighbours'
- Number of neighboring pages at the left and the right sides (4 by default)
See example for more information.
\Kilte\Silex\Pagination\PaginationTrait
adds the following shortcut:
object pagination(int $total[, int $current[, int $perPage[, int $neighbours = 4]]])
- is alias for $app['pagination']()
$ composer install
$ vendor/bin/phpunit
- Added unit tests
- Other small improvements
- Updated pagination to 1.1.0
- Moved pagination service to another library
- First release
- Fork it
- Create your feature branch (git checkout -b awesome-feature)
- Make your changes
- Write/update tests, if necessary
- Update README.md, if necessary
- Push your branch to origin (git push origin awesome-feature)
- Send pull request
- ???
- PROFIT!!!
Do not forget merge upstream changes:
git remote add upstream https://github.com/AmsTaFFix/silex-pagination
git checkout master
git pull upstream
git push origin master
Now you can to remove your branch:
git branch -d awesome-feature
git push origin :awesome-feature
The MIT License (MIT)