Integrating Doctrine with Zendframework for modules

When I started learning PHP framework I started with symfony-project . Doctrine was one of the coolest feature I loved. So I thought of learning Doctrine to use with Zend-framework . Recently I was looking  zendcasts.com to integrate doctrine with zend-framework . I think Jon didn't get much time to think about this solution else he may have come with the module based solution . But I was interested to provide how we can bring the doctrine models to different modules for zendframework. Use the below code in doctrine.php when using zendcasts doctrine integration with zendframework .

The way it works is

$./doctrine < arguments for doctrine > module <module name >

Module name is the zendframework module . If no module is specified or the specified module directory is not found , will create in the application/models folder . Else the models folder of the particular module. Assuming the migrations , schema.yml , fixtures etc are  there for each specific module :) .

Tags: 

Comments

Question.

Jonathan's picture

This tutorial does not work for me, I'm using Doctrine 2, which version you used in the tutorial?

A new tutorial explaining more would be very welcome, I'm almost going crazy looking for an integration between the Zend Framework and Doctrine 2 that supports a modular system, but I have not been successful, and I'm sure I'm not the only one.

I saw many tutorials out there, but they are many, many lines of code that I think does not need and which would further lower performance.

Sorry by the poor english.

Add new comment