开发者

Using two libraries in two different project in Zend

I'm currently working on my main project but I need to extend some of the models on different project in completely d开发者_如何学JAVAifferent folder from my main project.

Can anybody point me to the right direction on how to do this?

I did think of using include_path on the setting, and registering it on application.ini using autoloaderNamespace but it couldn't find it.

Thanks


I would recommend creating a custom library with it's own namespace. Move all of the models for your "main project" to a model folder within this library. Then have the models in your main project as well as the new project extend the models within this library. You could maintain this library in an SVN repository and include it in both projects as an external.

So your directory structure might look something like this:

htdocs
    library
        My
            Model
                Modelname
    application
        models
            Modelname

Then your model would look something like this

class Model_Modelname extends My_Model_Modelname {}

Hope this points you in the right direction!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜