PHPackages                             tommylykerin/php-paginator - 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. tommylykerin/php-paginator

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

tommylykerin/php-paginator
==========================

Pagination class for PHP

v0.1.0(7y ago)083PHP

Since Dec 20Pushed 7y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PHP-Paginator
=============

[](#php-paginator)

A simple pagination class for PHP

Installation
------------

[](#installation)

### Option 1: Install via composer (recommended)

[](#option-1-install-via-composer-recommended)

```
 composer require tommylykerin/php-paginator

```

include composer's autoload.php file in your project.

### Option 2: Clone

[](#option-2-clone)

Clone or Download the project to your computer include the Paginator.php file in your project.

Usage
-----

[](#usage)

instantiate the Paginator class passing the total number of results as the first argument and the number of results per page as the second argument to the class constructor:

```
$paginator = new Paginator(500, 5);

```

echo a call the paginate method:

```
echo $paginator->paginate();

```

the URL is automatically generated based on the current URL in the address bar.

If you want to set custom URL, you should call the `set_url()` method passing the desired URL as the parameter:

```
$paginator = new Paginator(500, 5);
$paginator->set_url("http://custom_url.com/?query=preserved");
echo $paginator->paginate();

```

This will append the page data to the set URL. The existing parameters in the URL are preserved. This example will produce: `http://custom_url.com/?query=preserved&page=1`, etc.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

2697d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b739d7203a863b99d21a232feebb96c8b649bf0087f46cc3d905a64d53731f5?d=identicon)[tomiwahq](/maintainers/tomiwahq)

---

Top Contributors

[![tomiwahq](https://avatars.githubusercontent.com/u/19550920?v=4)](https://github.com/tomiwahq "tomiwahq (16 commits)")

### Embed Badge

![Health badge](/badges/tommylykerin-php-paginator/health.svg)

```
[![Health](https://phpackages.com/badges/tommylykerin-php-paginator/health.svg)](https://phpackages.com/packages/tommylykerin-php-paginator)
```

PHPackages © 2026

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