Re: [PHP] Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread Stuart
2009/7/19 MEM tal...@gmail.com: Pagination is the generically applicable class - it should know nothing about what specifically it's paginating. Ok... but I need to grab values of my DAO classes, I mean, even if we paginate images on a directory or records on a database table, the pagination

[PHP] Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread MEM
Hello, I have a Animals DAO class that I'd like to apply a pagination class to it. Between this two classes, there will be a composition relation (more precisely, an association one). My question is: Is a Pagination that has a Animal. OR Is a Animal that has a pagination? Should we create on

RE: [PHP] Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread MEM
Pagination is the generically applicable class - it should know nothing about what specifically it's paginating. Ok... but I need to grab values of my DAO classes, I mean, even if we paginate images on a directory or records on a database table, the pagination should have a $limit, and a

Re: [PHP] Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread Stuart
2009/7/19 MEM tal...@gmail.com: Hello, I have a Animals DAO class that I'd like to apply a pagination class to it. Between this two classes, there will be a composition relation (more precisely, an association one). My question is: Is a Pagination that has a Animal. OR Is a Animal that has

RE: [PHP] Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread MEM
I don't know how your other classes are arranged, myPDO.class.php - Singleton. Makes the connection to the database possible. generalDAO.class.php - Abstract DAO Class, grabs the myPDO instance and could have other methods on the future that are shared for all the DAO classes.

Re: [PHP] Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread Stuart
2009/7/19 MEM tal...@gmail.com: I don't know how your other classes are arranged, myPDO.class.php - Singleton. Makes the connection to the database possible. generalDAO.class.php - Abstract DAO Class, grabs the myPDO instance and could have other methods on the future that are shared for

RE: [PHP] Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread MEM
I would say your pagination logic belongs in myPDO.class.php. Where I have this functionality it's as simple as two arguments to the method that gets data, $page and $perpage. Setting both to false would retrieve all rows. Interesting but, still no clue, on this side, about how to

Re: [PHP] Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread Stuart
2009/7/19 MEM tal...@gmail.com: I would say your pagination logic belongs in myPDO.class.php. Where I have this functionality it's as simple as two arguments to the method that gets data, $page and $perpage. Setting both to false would retrieve all rows. Interesting but, still no clue, on