Newbie: Composition by Association - Pagination Class general question.
| From: | MEM | Date: | Sun, 19 Jul 2009 11:53:44 +0000 |
| Subject: | Newbie: Composition by Association - Pagination Class general question. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-295568@lists.php.net to get a copy of this message | ||
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 Class Pagination a property named $_animal OR, should we
create on class Animal a property named $_pagination?
I'm inclined to accept the second one, since, if I put the property $_animal
on my classe Pagination, I will end up, on the Pagination Class, with so
many properties as pagination objects... :s
Any help please?
Márcio