Zend Framework 1.9和Doctrine Integration [英] Zend Framework 1.9 and Doctrine Integration
问题描述
以前曾经与ZF 1.8进行过讨论。
我正在尝试设置Zend Framework和Doctrine。 ul>
该讨论没有考虑到AutoLoader / Bootstrap系统。
如果我使用./zh.sh生成应用程序框架,我将如何整合Doctrine。
找到解决方案
http://pastie.org/481635
http://pastie.org/481633
在application / configs / application.ini中设置自动加载器和插件路径:
autoloadernamespaces.0 = Doctrine
pluginpaths.ZendX_Doctrine_Application_Resou rce =ZendX / Doctrine / Application / Resource
在公共/ 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(),
)));
保存 http://pastie.org/481633 到图书馆/ ZendX / Doctrine / Application / Resource / Doctrine.php
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.
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/Doctrine/Application/Resource/Doctrine.php
这篇关于Zend Framework 1.9和Doctrine Integration的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!