Open sandrokeil opened 10 years ago
Before supporting zend db metadata, I would rather refactor the \Sake\CodeGenerator\Hydrator\DoctrineMetadata hydrator to map to a metadata model instead of an array with specific keys. Maybe this metadata model should be based on the Zend\Db\Metadata\MetadataInterface with an additional Interface to support features like assotiation mappings.
The support of zend db would be very easy after this change, because there already are implementations of the MetadataInterface for various MetadataSources, that could be extended for the additional interface.
That sounds good. But i think it should use its own meta data interface because zend db and doctrine meta data are to different. I've planed to use \Sake\CodeGenerator\Code\Generator\Metadata
. So both hydrators have no problems.
To generate code from zend db we need an metadata hydrator like
\Sake\CodeGenerator\Hydrator\DoctrineMetadata
which maps zend db metadata to specific array keys.