sandrokeil / CodeGenerator

Zend Framework 2 (ZF2) code generator which generates form and input filter depending on database or doctrine 2 meta data
Other
1 stars 5 forks source link

Zend\Db\Metadata Hydrator to generate Code #1

Open sandrokeil opened 10 years ago

sandrokeil commented 10 years ago

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.

GordonSchmidt commented 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.

sandrokeil commented 10 years ago

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.