starlit/paginator
Composer 安装命令:
composer require starlit/paginator
包简介
Generates pagination HTML.
关键字:
README 文档
README
Generates pagination HTML.
Installation
Add the package as a requirement to your composer.json:
$ composer require starlit/paginator
Usage
<?php use Starlit\Paginator; $currentPageNo = 1; $rowsPerPage = 10; $totalRowCount = 20; $paginator = new Paginator( $currentPageNo, $rowsPerPage, $totalRowCount, function ($page) { return 'index.php?page=' . $page; } ); echo $paginator->getHtml();
Produces:
<div class="pagination multiple-pages"> <ul> <li class="previous disabled"><span>«</span></li> <li class="active"><a href="index.php?page=1">1</a></li> <li><a href="index.php?page=2">2</a></li> <li class="next"><a href="index.php?page=2">»</a></li> </ul> </div>
Requirements
- Requires PHP 7.1 or above.
License
This software is licensed under the BSD 3-Clause License - see the LICENSE file for details.
统计信息
- 总下载量: 50.32k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2016-04-04