cethyworks/ doctrine-paginator-decorator
Doctrine Paginator 的装饰器/辅助工具
v1.0
2017-07-10 12:49 UTC
Requires
- php: >=5.6.17
- doctrine/orm: ^2.5
Requires (Dev)
- phpunit/phpunit: ^4.8
This package is not auto-updated.
Last update: 2024-09-20 20:11:02 UTC
README
Doctrine\ORM\Tools\Pagination\Paginator 的装饰器/辅助工具。
安装
1. 使用 Composer 安装
$ composer require cethyworks/doctrine-paginator-decorator
如何使用
$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