cethyworks / doctrine-paginator-decorator
Decorator/helper for Doctrine Paginator
Installs: 272
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.6.17
- doctrine/orm: ^2.5
Requires (Dev)
- phpunit/phpunit: ^4.8
This package is not auto-updated.
Last update: 2024-11-15 20:58:40 UTC
README
Decorator/helper for Doctrine\ORM\Tools\Pagination\Paginator.
Install
1. Composer require
$ composer require cethyworks/doctrine-paginator-decorator
How to use
$paginator = new DoctrinePaginatorDecorator($queryBuilder, $currentPage, $limitPerPage);
$paginator->getPage(); // return current page
$paginator->getLimit(); // return limit per page
$paginator->hasNextPage(); // return true if there is enough result for a next page
$paginator->getCount(); // return total entity count
$paginator->getList(); // return entity list for current page