Hi Folks,
does someone knows some good examples for an PHP Application using those 4 "Layers"
ServiceLayer -> Model --> DataMapper --> DAO
Iam not sure if it makes sense, when i use such a design i have to do the following to create a new Record in my Database :
$servcie = new Service(new Mapper(new Dao));
$service->save($data)
the Service is creating an new Data Object and passing it into the Mapper, the Mapper is passing the Data to the provided Dao..
what is the intension to use such constructs ?
Why not simply :
$model = new Model();
$model->save($data)
Model is saving to DB