In my controller I had the idea to do something like the following:
// retrieve fields from form $firstname = $form->getInput('firstname'); $lastname = $form->getInput('lastname'); [...] // create Member object $member = new Member($firstname, $lastname, [...]); // save Member in DB $this->_daoFactory->get('Member')->save($member);
In this example, the DAO factory would create an instance of the MemberDAO class, which (I guess) acts like a data mapper? And allows me to save the Member object in DB, to update a Member, get a Member from id, and other db requests probably.
What do you think about this code?
Thank you for your review!