whiteoctober/Pagerfanta — pull request #40 by igorw (2011-12-09 19:36:49+00:00)
Title: add a Solarium (solr client) adapter

Solarium: [solarium-project.org](http://solarium-project.org)

Example usage (with [NelmioSolariumBundle](https://github.com/nelmio/NelmioSolariumBundle)):

$solarium = $this->get('solarium.client');

$query = $solarium->createSelect();
$query->setQuery($searchQuery->getQuery());

$paginator = new Pagerfanta(new SolariumAdapter($solarium, $query));
$paginator->setMaxPerPage(15);
$paginator->setCurrentPage($req->query->get('page', 1), false, true);

return $this->render('PackagistWebBundle:Web:search.html.twig', array('packages' => $paginator));

It will be used on [packagist.org](http://packagist.org).

Also allows Adapter::getSlice() to return an Iterator or IteratorAggregate.