开发者

Getting started with Doctrine for Zend

开发者 https://www.devze.com 2023-03-11 18:57 出处:网络
I\'m trying to get started with Doctrine for Zend. There doesn\'t seem to be a lot out there to help me with this. I find the website and documentation a bit useless.

I'm trying to get started with Doctrine for Zend. There doesn't seem to be a lot out there to help me with this. I find the website and documentation a bit useless. I'm currently looking at this webpage.

There are a few options. I can checkout from subversion or github. Install via PEAR. or download a pa开发者_如何学运维ckage.

What should I be doing with the lines of code in the black boxes? What do I do with a package once I've extracted it?

As an aside Am I a little out of my depth? Is there anything I should be learning before I start tackling Doctrine?


You really should have a look at the Zend Framework webinars, and more specifically the one called Zend Framework v1 + Doctrine v2. It's got detailed instructions and links to GitHub where you can download the source presented in the webinar.

The presentation slides can be found at http://static.zend.com/topics/Zend-Framework-1-+-Doctrine-2.pdf.

Presentation summary :

Zend Framework (version 1) is an enterprise grade, full stack MVC framework and component library. Doctrine (version 2) is an enterprise grade, ORM (object-relational mapping) framework for PHP 5.3. In this webinar, the ZF and Doctrine teams join forces to demonstrate how best to integrate these two frameworks and produce a ZF powered MVC application where in which the "M" is powered by Doctrine2. Familiarity of PHP 5.3 features is suggested. Presenter – Ralph Schindler, Jonathan Wage and Guilherme Blanco (87min) Dec 15 2010

You will have to register with Zend though (but that's free, so shouldn't pose any problems I guess).


Actually, there are some resources you could use to integrate Zend Framework and Doctrine. In example, you could follow this screencasts:

ZendCasts - Doctrine

I've followed these screencasts, with a few corrections, and I was able to use Doctrine 1.x with Zend Framework applications. You can also view the generated screencasts' code; this option is available in the most of these screen casts.


You will want to use Doctrine 2, not version 1.2. The two are not compatible. Here is a presentation that explains why:

http://www.slideshare.net/ralphschindler/zend-framework-1-doctrine-2-6177485

Here are example sources for Zend Framework + Doctrine 2 integration:

https://github.com/fierycode/ZendFramework1-Doctrine2

https://github.com/marsbomber/zf1-doctrine2/tree/modular_setup (with modules)


I have already pointed someone in the right direction to integrate Doctrine 1.2 into ZF, my post can be found here.

I hope this helps you out.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号