BenGriffiths / pdo-mysqli-pagination

A PDO & MySQLi PHP Pagination Class - PDO MySQLi Pagination class is a PHP pagination class that will work with either PDO, or MySQLi. The outputted pagination is served as a UL or as an array, and the options are extensive.
50 stars 27 forks source link

links #2

Closed damonsk closed 12 years ago

damonsk commented 12 years ago

Would it be possible to expose the links as maybe an array/array of object instead of html. This would be useful for MVC type apps?

BenGriffiths commented 12 years ago

I could make it so you had both options - personally I like having the UL as it makes life easier when re-using it, but an array would definitely be useful too

damonsk commented 12 years ago

I do agree, its useful having the preset html available. I'm currently using it but had to amend slightly to match my project. If and when updates come through, i'll have to re-adjust the html.

Separating out the html or providing the links as an array would prevent this.

Both options work for me.

Awesome work btw.

BenGriffiths commented 12 years ago

Thanks :) How close is what you've done to what you've suggested? You could always fork and add the changes if you like and then I can pull it in (if I can figure out pulling lol)

damonsk commented 12 years ago

Your original html wasn't far off what I required, I'm using the bootstrap pagination (http://twitter.github.com/bootstrap/components.html#pagination). I haven't implemented accessing the links as a collection and the html amends were minimal thanks to the construct/options awway.

BenGriffiths commented 12 years ago

ah I see, I'll add it in the next commit then :)

BenGriffiths commented 12 years ago

I've added a an array which holds all the link information now - if you take a peek at the readme on the front page at the very bottom, you'll get an idea of what it holds

damonsk commented 11 years ago

awesome, not had chance checkout the changes yet but thank you.