title: php paging class
body: <p>Can anyone recommend a good PHP paging class?</p>
  
  <p>I have searched google, but have not seen anything that matches my requirements. Rather than "rolling my own" (and almost surely reinventing the wheel), I decided to check in here first.</p>
  
  <p>First some background:</p>
  
  <p>I am developing a website using Symfony 1.3.2 with Propel ORM on Ubuntu 9.10. I am currently using the Propel pager, which is OK, but I recently started using memcache to speed things up a little. At this point, the Propel pager is of little use, as it (AFAIK), only works with Propel objects.</p>
  
  <p>What I need is a class th:t meets the following requirents</p>
  
  <ol>
  <li><p>Has clean interface, with separation of concerns, so that the logic to retrieve records from the datasource (e.g. database) is encapsulated in a class (or at least a separate file).</p></li>
  <li><p>Can work with arrays of objects</p></li>
  <li><p>Provides pagination links, and only fetches the data required for the current page. Also, the pagination should 'split' the available page links if there are too many. For example, if there are potentially 1000 possible page links, the pages displayed should be something like FIRST 2,3 ....999 LAST</p></li>
  <li><p>Can return the number of all the records in the table being queried, so that the following links are available FIRST, LAST (this requirement is actually already covered in the previous requirement - but I just wanted to re-emphasise it).</p></li>
  </ol>
  
  <p>Can anyone recommend such a library, if they have used it succesfully in the past?</p>
  
  <p>Alternatively, someobe may have 'hacked' (e.g. derived from) the current Propel pager, to get it to do the things I listed about - please let me know.</p>