npacker / nFramework

A simple MVC framework in PHP.
1 stars 0 forks source link

Decouple DomainObjectCollection from DataMapper #27

Open npacker opened 9 years ago

npacker commented 9 years ago

Pass the DomainObjectCollection to the DataMapper methods that return multiple records, and inject the DomainObjectCollection and DomainObjectFactory into the Action where they are needed. Add methods to the DomainObjectCollection to set the resultset and factory. This should help to enforce the use of DomainObjectCollection for methods such as findAll() (which is already in the interface) and reduce coupling.