pagerwave/doctrine-collections-extension

PagerWave extension for Doctrine Collections support

Installs: 2 553

Dependents: 0

Suggesters: 0

Security: 0

pkg:composer/pagerwave/doctrine-collections-extension

v2.4.0 2025-07-02 18:41 UTC

This package is auto-updated.

Last update: 2025-11-02 19:31:51 UTC


README

This package lets you paginate Doctrine Collections objects using PagerWave.

Installation

composer require pagerwave/doctrine-collections-extension

Usage

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Criteria;
use PagerWave\Extension\DoctrineCollections\SelectableAdapter;

// Any collection that implements the Selectable interface works,
// including Doctrine ORM repositories, and persisted collections.
$collection = new ArrayCollection();

// Optionally, provide criteria as the second argument to the adapter.
$criteria = Criteria::create()
    ->where(Criteria::expr()->eq('visible', true));

$adapter = new SelectableAdapter($collection, $criteria);

Read the PagerWave documentation to learn more.

Licence

This project is released under the Zlib licence.