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 Custom elements using ServiceManager not work
zend framework 2 gettext translation using others comments
How to pass arrays in ZF2 routes?
Image slider in layout
display multiple forms in one page [closed]
Zend framework 2 database relations
ZF2 An alias “translator” was requested but no service could be found. error on creating new skeleton project
How to set db adapter to Validator NoRecordExists and use it in controller?
Is there a way to add a log writer factory into the logger configuration?
zf2 make a join between two different databases
How to apply classes to labels using Zend\Form and add line endings within the rendered form?
Include js and css in ZF2 using AJAX or not
How to access custom view helper in a partial?
Where is the ServiceManager object initialized in the Zend Framework 2 User Guide?
Zend Framework 2 - Hide login link when logged in and vice versa for logout
ZF2 Route with Colon Separator