Is there a better way to bind data from the doctrine2 ODM entity class to the Zend2 form, in addition, using bind() ?
If so, what would it be? Would I just get the data as an array and pass each individual field? I fight this and most likely make it harder than it should be.
When I call the bind() function, it throws a Zend error referring to the default hydrator. Do I need to do something in an entity class?
Edit: Here are the exact mistakes that Zend is throwing.
~ \ vendor \ ZendFramework \ ZendFramework \ Library \ Zend \ STDLIB \ Hydrator \ ArraySerializable.php: 35
Zend \ Stdlib \ Hydrator \ ArraySerializable :: extract expects the provided object to implement getArrayCopy ()
They make me think what I need:
- use Zends hydrators (which I should explore how to implement) or
- use doctrines2 hydrators (which, I would also have to find a better way to implement)
bl4design
source share