whiteoctober/Pagerfanta — pull request #35 by z7 (2011-11-27 10:23:24+00:00)
Title: Let Pagerfanta Implement \Countable interface

Hi,

Thanks for the great paginator, that I've been using for some time now.
Still, there is this small usability issue, I'd like to address.

USE CASE:
In back-end modules I work with, I usually use Pagerfanta instances directly in Twig templates.
Some of them being generic and having either Pagerfanta instances, or other Traversable objects or arrays.
So I wanted to propose the usage of \Countable, so there would be no necessity to use Pagerfanta's own getNbResults() call to check the number of records found in the database or if there are any results at all.