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