Dependency Injection and Unit of Work pattern
- by sunwukung
I have a dilemma. I've used DI (read: factory) to provide core components for a homebrew ORM.
The container provides database connections, DAO's,Mappers and their resultant Domain Objects on request.
Here's a basic outline of the Mappers and Domain Object classes
class Mapper{
public function __constructor($DAO){
$this->DAO =…