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

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

compolomus/pagination
=====================

Pagination

v1.2(4y ago)2801MITPHPPHP ^8.0CI failing

Since Aug 19Pushed 4y ago1 watchersCompare

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

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

Compolomus Pagination
=====================

[](#compolomus-pagination)

[![License](https://camo.githubusercontent.com/d147d394f87044d003045f00dea42f73fa6c981413f593759237e9541d7ffd85/68747470733a2f2f706f7365722e707567782e6f72672f636f6d706f6c6f6d75732f506167696e6174696f6e2f6c6963656e7365)](https://packagist.org/packages/compolomus/Pagination)

[![Build Status](https://camo.githubusercontent.com/8dfd2e50fc2e3122e7d6f6b2128e744e64f9cf816a99c74b22a8981e5fe98b1e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436f6d706f6c6f6d75732f506167696e6174696f6e2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Compolomus/Pagination/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3a1bbbfc235edab6b26bf1d7f4e2d89df3b73c691d425cfcabbb14aa193d1c60/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436f6d706f6c6f6d75732f506167696e6174696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Compolomus/Pagination/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/8a6d3a6d81373d2db73e03f45c8e2e439342d4c9b3d973f6f6c56ed803c47a31/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436f6d706f6c6f6d75732f506167696e6174696f6e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Compolomus/Pagination/?branch=master)[![Code Climate](https://camo.githubusercontent.com/6b8e327c315e67f6536332f3e222aa23cf6a732fe67db9e5ff5cfd0a08dd2ed5/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f436f6d706f6c6f6d75732f506167696e6174696f6e2f6261646765732f6770612e737667)](https://codeclimate.com/github/Compolomus/Pagination)[![Downloads](https://camo.githubusercontent.com/e5b1249ec10fe684a2fdec346ea15b700d769732505e2c45b13b2d78f475a204/68747470733a2f2f706f7365722e707567782e6f72672f636f6d706f6c6f6d75732f506167696e6174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/compolomus/Pagination)

Установка:
----------

[](#установка)

composer require compolomus/pagination

Применение:
-----------

[](#применение)

```
use Compolomus\Pagination\Pagination;

require __DIR__ . '/vendor/autoload.php';

$page = $_GET['page'] ?? 1;

$items = range(1, 200);

echo count($items);

#1

$nav = new Pagination((int) $page, 10, count($items), 7, true);
$navIntegers = new Pagination((int) $page, 10, count($items), 7);

for ($i = $nav->getOffset(); $i < $nav->getEnd(); $i++) {
    echo '' . $items[$i] . '';
}

#2

foreach (new LimitIterator(new ArrayIterator($items), $nav->getOffset(), $nav->getLimit()) as $item) {
    echo '' . $item . '';
}

#3

$count = 200; // select count(*) from table

$select = range(100, 1000, 100); // select * from table limit $nav->getLimit() offset $nav->getOffset()

/*
while($row = fetch($select)) {
// ...
}
*/

echo '' . print_r($nav->get(), true) . '';

/*
    Array
    (
        [prev] => 9
        [first] => 1
        [second] => 2
        [0] => 1
        [leftDots] => ...
        [1] => 3
        [2] => 4
        [3] => 5
        [4] => 6
        [5] => 7
        [6] => 8
        [7] => 9
        [current] => 10
        [8] => 11
        [9] => 12
        [10] => 13
        [11] => 14
        [12] => 15
        [13] => 16
        [14] => 17
        [rightDots] => ...
        [15] => 20
        [last] => 20
        [next] => 11
        [preLast] => 19
    )
*/

echo '' . print_r($navIntegers->get(), true) . '';

/*
    Array
    (
        [0] => 1
        [1] => ...
        [2] => 3
        [3] => 4
        [4] => 5
        [5] => 6
        [6] => 7
        [7] => 8
        [8] => 9
        [9] => 10
        [10] => 11
        [11] => 12
        [12] => 13
        [13] => 14
        [14] => 15
        [15] => 16
        [16] => 17
        [17] => ...
        [18] => 20
    )
*/
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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 ~477 days

Total

3

Last Release

1598d ago

PHP version history (2 changes)v1.0PHP ^7.2

v1.2PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10777258?v=4)[Дмитрий](/maintainers/Compolomus)[@Compolomus](https://github.com/Compolomus)

---

Top Contributors

[![Compolomus](https://avatars.githubusercontent.com/u/10777258?v=4)](https://github.com/Compolomus "Compolomus (12 commits)")

---

Tags

paginationpagination-templatepagination

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[wenzhixin/bootstrap-table

An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)

11.8k288.4k1](/packages/wenzhixin-bootstrap-table)[babdev/pagerfanta-bundle

Bundle integrating Pagerfanta with Symfony

21019.8M102](/packages/babdev-pagerfanta-bundle)[webcreate/jquery-ias

Infinite Ajax Scroll: A jQuery plugin that turns your server-side pagination into an infinite scrolling one using AJAX

899744.5k3](/packages/webcreate-jquery-ias)[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.

4071.3M22](/packages/jasongrimes-paginator)[aplus/pagination

Aplus Framework Pagination Library

2171.6M3](/packages/aplus-pagination)[kop/yii2-scroll-pager

Infinite AJAX scrolling for Yii2 ListView widget

178740.8k11](/packages/kop-yii2-scroll-pager)

PHPackages © 2026

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