PHPackages                             lsys/pagination - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lsys/pagination

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lsys/pagination
===============

lsys module pagination

0.0.1(5y ago)010Apache-2.0PHP

Since Jun 28Pushed 5y agoCompare

[ Source](https://github.com/php-lsys/pagination)[ Packagist](https://packagist.org/packages/lsys/pagination)[ RSS](/packages/lsys-pagination/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

分页
==

[](#分页)

> 对分页生成的统一封装

使用示例:

```
//当不传入渲染对象时,默认使用 SimpleHtml 渲染
// SimpleHtml 渲染结果为 html 代码
/*
//自定义地址,如列表加条件等
$sh=new LSYS\Pagination\Render\SimpleHtml();
$sh->set_tpl_url('./page.php?age=bbb');
*/
$page = Pagination::factory();

//设置总结果数量
$page->set_total(1000);

//当渲染无法解析来源页码时,手动设置页码
//默认 SimpleHtml 渲染将根据渲染规则解析当前页码的页码,无需设置
// $page=1;
// $page->set_page($page);

//判断当前页码设置是否有效
//非必须
if(!$page->valid_page()){
	die("当前页码无效");
}

//获取可能会用到的分页数据

//当前页码
$now_page=$page->get_page();

//偏移位置,一般DB查询会用到
$offset=$page->get_offset();

//总页码
$total_page=$page->get_total_page();

//每页数量
$limit=$page->get_limit();

//总结果数量
$total=$page->get_total();

//渲染分页
echo $page;

```

> 搭配ORM使用 ,非常方便从数据库得到数据 示例 :dome/db.php

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2147d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f1652fec3beae86de90c6615dd28be4729251e1b2bb08f1cd18e8193e6c4e48?d=identicon)[lsys](/maintainers/lsys)

---

Top Contributors

[![shanliu](https://avatars.githubusercontent.com/u/2927231?v=4)](https://github.com/shanliu "shanliu (8 commits)")

### Embed Badge

![Health badge](/badges/lsys-pagination/health.svg)

```
[![Health](https://phpackages.com/badges/lsys-pagination/health.svg)](https://phpackages.com/packages/lsys-pagination)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
