views:

4015

answers:

4

I'm trying to setup Zend Framework and Doctrine.

There is this previous discussion with ZF 1.8

That discussion doesn't take into account the AutoLoader / Bootstrap System.

If I generate an application skeleton with ./zh.sh how would I go about integrating Doctrine.

+5  A: 

Found a solution

http://pastie.org/481635 http://pastie.org/481633

Setup autoloader and plugin path in application/configs/application.ini:

autoloadernamespaces.0 = "Doctrine"

pluginpaths.ZendX_Doctrine_Application_Resource= "ZendX/Doctrine/Application/Resource"

Add paths to models and generated models in public/index.php

set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    realpath(APPLICATION_PATH . '/models'),
    realpath(APPLICATION_PATH . '/models/generated'),
    get_include_path(),
)));

Save http://pastie.org/481633 to library/ZendX/Resource/Doctrine.php

+4  A: 

Matthew Weier O'Phinney has blogged about the issue

hmayed
+2  A: 

I picked up a few pointers from the previously suggested entry by Mathew Weier O'Phinney, as well as entries from Danceric that were originally based on ZF 1.8:

You may also be interested in the following links (a selection of my bookmarks matching "zend framework" and "doctrine"):

Apologies for the plain text links. I am a new user here and subject to strict spam prevention rules.

enbuyukfener
A: 

You can find a great tutorial here http://zend-framework-doctrine.blogspot.com/

sameer