Zend Framework 1.9和Doctrine Integration [英] Zend Framework 1.9 and Doctrine Integration

查看:91
本文介绍了Zend Framework 1.9和Doctrine Integration的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



以前曾经与ZF 1.8进行过讨论。



我正在尝试设置Zend Framework和Doctrine。 ul>

  • 将教义与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_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屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆