/ZendPaginatorAdapter

Provides Zend Paginator Adapters. Currently Doctrine MongoDB and Doctrine ORM pagers are implemented.

Primary LanguagePHP

Provides Zend Paginator Adapter implementations.

Learn about the paginator on Zend Framework Paginator documentation.

DoctrineMongoDBAdapter

use Zend\Paginator\Paginator;
use ZendPaginatorAdapter\DoctrineMongoDBAdapter;

$query      = $repository->createQuery();           // create a Doctrine MongoDB Query
$adapter    = new DoctrineMongoDBAdapter($query);   // create a Doctrine MongoDB Adapter
$paginator  = new Paginator($adapter);              // create a Paginator

DoctrineORMAdapter

use Zend\Paginator\Paginator;
use ZendPaginatorAdapter\DoctrineORMAdapter;

$query      = $repository->createQuery();           // create a Doctrine ORM Query
$adapter    = new DoctrineORMAdapter($query);       // create a Doctrine ORM Adapter
$paginator  = new Paginator($adapter);              // create a Paginator