zf2 composite model factory creation - FactoryInterface/Mapper?
I'm a bit mentally stuck when it comes to object creation in zf2. I am using factory classes (implements FactoryInterface) for the servicemanager to create objects. The issue arises from composite objects $model = new ObjectA(new ObjectB(), new ObjectC()) that need populating, such as from the database. Since objects' B and C are a dependency of A, should mappers for objects B and C also be dependencies of object A's mapper? eg. $modelMapper = new ObjectAMapper(new ObjectBMapper(), new ObjectCMapper()) Also, when it comes to the Mapper for object A finding and creating an object - should it call create methods on ObjectBMapper and ObjectCMapper? Or how can i make the object creation separate from the mappers and use the FactoryInterface'd factory to return both populated and empty objects? I thought of passing the Factory into the Mapper but since FactoryInterface::createService requires a servicelocator interface i don't think it's the right place
Zend Framework 2 ZF tool creating controller
Modules in zend framework 2
ZF2 An Invalid Factory Was Registered
How to show form drop down from database in Zend Framework 2.4.0?
Do zend framework has application setup wizard module?
Zend Framework 2 - How to give declare folder path in terms of “use” and “namespace”
Zend framework 2 session exists or not, in Module.php
Zend Framework 2 - Deploy proeject to web server
get all data from mysql query in zend 2
ZF2 optionally change user password in form
Vagrant + ZF2: vagrant not able to bring up ZF2 interface
Different layout for different module in zf2
'Zend\View\Renderer\PhpRenderer::render: Unable to render template “error”;
ZendF 2 form view helper escapes attributes
Get user's profile data after auth with SocalNick/ScnSocialAuth
delete parameters in URL