开发者

How to include a library in Symfony

I am writing an application using Symfony. I have some reusable components that I don't want to put into the main Symfony modules; i开发者_如何学Gonstead, they are in the lib directory.

What I want to know is, what is the best way to include this file? Can I include lib/foo/bar.php or do I need a full path, or is there something else I should do?


I'm not an expert in Symfony, but these links should help You. Besides, because I am new to this forum, stackowerfolow lets me post just 1 link, so my second link will be explanation how to find it. ;)

  1. http://forum.symfony-project.org/index.php/m/92916/

  2. Google: The Definitive Guide to symfony 1.2 (should be still relevant) . There check the chapter 17 - "Extending Symfony" under the paragraph Plugins .


you can use this to have the lib directory

sfConfig::get('sf_lib_dir')
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜