PHPackages                             rayful/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. rayful/pagination

ActiveLibrary

rayful/pagination
=================

A Library for Pagination, interagted in DB-Manager. Can be extended to change display, can See ViewBase Class.

2.01(8y ago)21.7k1PHP

Since Apr 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/rayful/Pagination)[ Packagist](https://packagist.org/packages/rayful/pagination)[ RSS](/packages/rayful-pagination/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (8)Dependencies (1)Versions (12)Used By (1)

Pagination
==========

[](#pagination)

一个简单通用分页类。包含分页器类（Pagination）及显示类（在View命名空间下，可通过继承ViewBase类进行扩展及自定义显示逻辑及CSS样式）。

安装
==

[](#安装)

```
composer install rayful/pagination

```

Pagination Interface 接口能力
=========================

[](#pagination-interface-接口能力)

```
interface PaginationInterface
{
    /**
     * 返回总共有多少条记录
     * @return int
     */
    public function getTotalRecord();

    /**
     * 返回每页限制显示多少条记录
     * @return int
     */
    public function getLimitRecord();

    /**
     * 返回这次查询该跳过多少条记录（数据库查询用，根据每页条数、当前页两个当前属性计算得出）
     * @return int
     */
    public function getSkipRecord();

    /**
     * 总共有多少页
     * @return int
     */
    public function getTotalPage();

    /**
     * 第一页的页码
     * @return int
     */
    public function getFirstPage();

    /**
     * 当前页的页码
     * @return int
     */
    public function getCurrentPage();

    /**
     * 最后一页的页码
     * @return int
     */
    public function getEndPage();

    /**
     * 下一页的页码
     * @return int
     */
    public function getNextPage();

    /**
     * 上一页的页码
     * @return int
     */
    public function getPrevPage();

    /**
     * 根据新页码输出新的URL
     * @param int $page 新页码
     * @param string $url 当前URL，如果不传入，将默认将自动读取$_SERVER全局变量
     * @return array
     */
    public function getNewURL($page, $url = null);
}

```

界面相关
====

[](#界面相关)

```

```

界面类说明
-----

[](#界面类说明)

### Bootstrap3 命名空间：\\rayful\\Tool\\Pagination\\Bootstrap3\\

[](#bootstrap3-命名空间rayfultoolpaginationbootstrap3)

- AlignedViewCN: \[\]
- ListingView:\[\]
- SimpleViewEN/SimpleViewCN:\[\]

### Bootstrap4 命名空间：\\rayful\\Tool\\Pagination\\Bootstrap4\\

[](#bootstrap4-命名空间rayfultoolpaginationbootstrap4)

- ListingView:\[\]
- SimpleViewEN/SimpleViewCN:样式请见test文件

### 自定义：请扩展ViewBase类，实现display()方法，可自定义显示逻辑及CSS和HTML样式。

[](#自定义请扩展viewbase类实现display方法可自定义显示逻辑及css和html样式)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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

Every ~51 days

Recently: every ~126 days

Total

11

Last Release

3161d ago

Major Versions

0.1.3 → 1.0.02016-04-22

1.04 → 2.02017-08-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/1412a217896637f39725a032a9fc9c77c8feeb843daa3b5b696b8eb0fef53a94?d=identicon)[kingmaxyang](/maintainers/kingmaxyang)

---

Top Contributors

[![kingmaxyang](https://avatars.githubusercontent.com/u/4504653?v=4)](https://github.com/kingmaxyang "kingmaxyang (8 commits)")[![super-young](https://avatars.githubusercontent.com/u/18026582?v=4)](https://github.com/super-young "super-young (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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