我正在尝试设置 Zend Framework 和 Doctrine。
之前有与 ZF 1.8 的讨论
- 将 Doctrine 与 Zend Framework 1.8 应用程序集成
该讨论没有考虑 AutoLoader / Bootstrap 系统。
如果我使用 ./zh.sh 生成应用程序框架,我将如何集成 Doctrine。
找到了解决方案
http://pastie.org/481635
http://pastie.org/481633
在 application/configs/application.ini 中设置自动加载器和插件路径:
autoloadernamespaces.0 = "Doctrine"
pluginpaths.ZendX_Doctrine_Application_Resource= "ZendX/Doctrine/Application/Resource"
在 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到库/ZendX/Doctrine/Application/Resource/Doctrine.php
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)