在Eclipse中为不同的PECL扩展启用PHP Code Assist [英] Enabling PHP Code Assist for different PECL extensions in Eclipse
问题描述
我在PHP环境中使用了一些PECL安装的扩展.我正在使用Eclipse进行开发,因此对这些扩展具有Eclipse的代码辅助/自动完成支持将非常有用.对于 Solr 扩展名,此过程非常有效:
I'm using a few PECL installed extensions in my PHP environment. I am developing with Eclipse and it would be useful to have Eclipse's code assist / auto-completion support for these extensions. This procedure worked quite well for the Solr extension:
- 我还下载了最新的 solr-php PECL来源,并将它们放在单独的文件夹中./li>
- 我将此特定文件夹作为外部文件夹"添加到了我的一个用户库(首选项-> PHP-> PHP库).
- 我将用户lib添加到了项目的php include路径(属性-> PHP Include路径->库->添加库)
- 在编辑器的自动完成中,我立即有了新的类/方法.
- I additionally downloaded the latest solr-php PECL sources and put them into a separate folder.
- I added this certain folder as an "external folder" to one of my User Libs (Prefrences -> PHP -> PHP Libraries).
- I added the user lib to my project's php include path (Properties -> PHP Include Path -> Libraries -> Add Library)
- I immediately had the new classes/methods available in the editor's auto-completion.
问题是:这似乎不适用于所有扩展.例如为扩展添加对PHP的MongoDB支持.为什么会这样?
The problem is: This doesn't seem to work for all extensions. E. g. for the extension adding MongoDB support to PHP. Why is that?
比较文件夹的内容我注意到Mongo扩展缺少一个像docs/documentation.php这样的php文件(包含在Solr扩展中).所有相关的* .h和* .c文件都可用.
Comparing the folders' contents I notice that the Mongo extension is missing a php file like docs/documentation.php (which is contained in the Solr extension). Whereas all relevant *.h and *.c files are available.
我必须自己生成某些文件吗?
Do I have to generate certain file(s) by myself?
提前感谢您的提示,加油!
Thanks in advance for your hints, cheers!
推荐答案
在mongodb的用户组中发布问题之后,我得到了一个包含* .php doc文件的链接,该文件用于mongo php驱动程序,将它们包含在我的文件中后解决了我的问题eclipse/pdt环境.
After posting the question at mongodb's user group I got a link containing *.php doc files for the mongo php driver, which solved my problem after including them in my eclipse/pdt environment.
- discussion at mongodb user group
- mongo php driver doc packages
A generate.php script is offered by the pdt project, the new link was given by @ss333 below.
这篇关于在Eclipse中为不同的PECL扩展启用PHP Code Assist的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!