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

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

webanatorly/pagination
======================

A library to split results into multiple pages

v1.0.1(6y ago)13MITPHPPHP &gt;=7.0.0

Since Apr 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/webAnatoly/pagination)[ Packagist](https://packagist.org/packages/webanatorly/pagination)[ Docs](https://github.com/webAnatoly/pagination)[ RSS](/packages/webanatorly-pagination/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (3)Used By (0)

Pagination
==========

[](#pagination)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/dnoegel/php-xdg-base-dir/blob/master/LICENSE)

A library to split results into multiple pages

Install
-------

[](#install)

Via Composer

```
$ composer require webanatoly/pagination
```

Usage
-----

[](#usage)

```
$obj = new Pagination\DirPager(
  new Pagination\PagesList(),
  'photos',
  3,
  2);
echo "";
print_r($obj->getItems());
echo "";
echo "$obj";
```

```
$obj = new Pagination\FilePager(
  new Pagination\ItemsRange(),
  'largetextfile.txt');
echo "";
print_r($obj->getItems());
echo "";
echo "$obj";
```

```
try {
  $pdo = new PDO(
    'mysql:host=localhost;dbname=test',
    'root',
    '',
    [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
  $obj = new Pagination\PdoPager(
    new Pagination\ItemsRange(),
    $pdo,
    'table_name');
  echo "";
  print_r($obj->getItems());
  echo "";
  echo "$obj";
}
catch (PDOException $e) {
  echo "Can't connect to database";
}
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/dnoegel/php-xdg-base-dir/blob/master/LICENSE) for more information.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Every ~0 days

Total

2

Last Release

2269d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10099091?v=4)[Anatoly](/maintainers/webanatoly)[@webAnatoly](https://github.com/webAnatoly)

---

Top Contributors

[![webAnatoly](https://avatars.githubusercontent.com/u/10099091?v=4)](https://github.com/webAnatoly "webAnatoly (2 commits)")

---

Tags

pagerpaginatorpagination

### Embed Badge

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

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

###  Alternatives

[jasongrimes/paginator

A lightweight PHP paginator, for generating pagination controls in the style of Stack Overflow and Flickr. The 'first' and 'last' page links are shown inline as page numbers, and excess page numbers are replaced by ellipses.

4091.3M22](/packages/jasongrimes-paginator)[ashleydawson/simple-pagination

Simple, lightweight and universal service that implements pagination on collections of things

19162.6k2](/packages/ashleydawson-simple-pagination)[ttskch/paginator-bundle

The most thin, simple and customizable paginator bundle for Symfony

1115.2k](/packages/ttskch-paginator-bundle)[sivka/paginator

bootstrap-4 fork of jasongrimes/php-paginator, a lightweight PHP paginator, for generating pagination controls in the style of Stack Overflow and Flickr. The 'first' and 'last' page links are shown inline as page numbers, and excess page numbers are replaced by ellipses.

141.4k](/packages/sivka-paginator)

PHPackages © 2026

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