PHPackages                             tobias/zend-paginator-doctrine - 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. [Database &amp; ORM](/categories/database)
4. /
5. tobias/zend-paginator-doctrine

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

tobias/zend-paginator-doctrine
==============================

Adapter to use Zend\\Paginator with Doctrine

03PHP

Since Jul 1Pushed 6y agoCompare

[ Source](https://github.com/tobias-trozowski/zend-paginator-doctrine)[ Packagist](https://packagist.org/packages/tobias/zend-paginator-doctrine)[ RSS](/packages/tobias-zend-paginator-doctrine/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Zend Paginator Doctrine
=======================

[](#zend-paginator-doctrine)

[![Build Status](https://camo.githubusercontent.com/f9ce3baff808e5a3c0f71e5a58df1faf4bbd021667b8cd7ce82de035a1bf8c82/68747470733a2f2f7472617669732d63692e636f6d2f746f626961732d74726f7a6f77736b692f7a656e642d706167696e61746f722d646f637472696e652e737667)](https://travis-ci.com/tobias-trozowski/zend-paginator-doctrine)

Inspired and based on the famous [DoctrineModule](https://github.com/doctrine/DoctrineModule).

### Collection adapter

[](#collection-adapter)

This package provides a simple Paginator adapter that can be used with DoctrineCollection.

> Note : if you are using Doctrine 2 ORM, what you are looking for is probably a Paginator adapter that can be used with Doctrine 2 Paginators. Luckily, DoctrineORMModule provides such a paginator adapter. You can find the documentation here :

#### Simple example

[](#simple-example)

Here is how you can use the Doctrine paginator adapter :

```
use Doctrine\Common\Collections\ArrayCollection;
use Tobias\Zend\Paginator\Adapter\Collection as CollectionAdapter;
use Zend\Paginator\Paginator;

// Create a Doctrine 2 Collection
$doctrineCollection = new ArrayCollection(range(1, 101));

// Create the adapter
$adapter = new CollectionAdapter($doctrineCollection);

// Create the paginator itself
$paginator = new Paginator($adapter);
$paginator->setCurrentPageNumber(1)
          ->setItemCountPerPage(5);

// Pass it to the view, and use it like a "standard" Zend paginator
```

For more information about Zend Paginator, please read the [Zend Paginator documentation](http://framework.zend.com/manual/2.0/en/modules/zend.paginator.introduction.html).

### Selectable adapter

[](#selectable-adapter)

This package also provides another paginator adapter that is based on new Selectable and Criteria interfaces from Doctrine &gt;= 2.3. It works with any Selectable objects (ObjectRepository for instance).

#### Simple example

[](#simple-example-1)

You can use it without any existing Criteria object:

```
use Tobias\Zend\Paginator\Adapter\Selectable as SelectableAdapter;
use Zend\Paginator\Paginator;

// Create the adapter
$adapter = new SelectableAdapter($objectRepository); // An object repository implements Selectable

// Create the paginator itself
$paginator = new Paginator($adapter);
$paginator->setCurrentPageNumber(1)
          ->setItemCountPerPage(5);

// Pass it to the view, and use it like a "standard" Zend paginator
```

If you want to further filter the results, you can optionally pass an existing Criteria object:

```
use Doctrine\Common\Collections\Criteria as DoctrineCriteria;
use Tobias\Zend\Paginator\Adapter\Selectable as SelectableAdapter;
use Zend\Paginator\Paginator;

// Create the criteria
$expr     = DoctrineCriteria::expr()->eq('foo', 'bar');
$criteria = new DoctrineCriteria($expr);

// Create the adapter
$adapter = new SelectableAdapter($objectRepository, $criteria); // An object repository implements Selectable

// Create the paginator itself
$paginator = new Paginator($adapter);
$paginator->setCurrentPageNumber(1)
          ->setItemCountPerPage(5);

// Pass it to the view, and use it like a "standard" Zend paginator
```

For more information about Zend Paginator, please read the [Zend Paginator documentation](http://framework.zend.com/manual/2.3/en/modules/zend.paginator.introduction.html).

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0355d9a2db10711c7f3d0ac8c97e9fbda01838b80455740b98f5a8b335b921cc?d=identicon)[tobias-trozowski](/maintainers/tobias-trozowski)

---

Top Contributors

[![tobias-trozowski](https://avatars.githubusercontent.com/u/3001979?v=4)](https://github.com/tobias-trozowski "tobias-trozowski (2 commits)")

### Embed Badge

![Health badge](/badges/tobias-zend-paginator-doctrine/health.svg)

```
[![Health](https://phpackages.com/badges/tobias-zend-paginator-doctrine/health.svg)](https://phpackages.com/packages/tobias-zend-paginator-doctrine)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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