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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/7/19 MEM <talofo@xxxxxxxxx>:
> 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

Pagination is the generically applicable class - it should know
nothing about what specifically it's paginating.

-Stuart

-- 
http://stut.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux