pollen-solutions/pagination
Composer 安装命令:
composer require pollen-solutions/pagination
包简介
Pollen Solutions - Pagination Component - Layer and utilities to paginate items in web applications
README 文档
README
Pollen Solutions Pagination Component provides layer and utilities to paginate items in web applications. It provides an adapter for Wordpress application.
Installation
composer require pollen-solutions/pagination
Basic Usage
use Pollen\Pagination\PaginationManager; use Pollen\Pagination\Paginator; $pagination = new PaginationManager(); $paginator = new Paginator( [ 'per_page' => 20, 'total' => 60, ] ); var_dump($paginator->toArray()); $pagination->setPaginator($paginator); echo $pagination;
Wordpress Usage
In this example, we consider that the current HTTP request corresponds to a search results page. ex. https://example.com/?s=a
use Pollen\Pagination\PaginationManager; add_action('wp', function () { echo new PaginationManager(); exit; });
Through a controller
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-11