如何使用codeigniter获取zend studio自动完成功能

Ste*_*hry 9 php codeigniter autocomplete zend-studio

我正在寻找一种很好的方法来获得在Zend Studio for Eclipse中工作的codeigniter中的库的自动完成和点击引用(无论那个叫什么).

例如,如果我做$ this-> load-> library('dx_auth'); $这 - > dx_auth-> get_user_id();

zend工作室不知道它是什么..

有这种黑客的方式(见下文,来源),但我觉得应该有一个更好的方法来做到这一点..

有人有主意吗?

// All of these are added so I get real auto complete
// I don't have to worry about it causing any problems with deployment
// as this file never gets called as I'm in PHP5 mode

// Core CI libraries
$config = new CI_Config();
$db = new CI_DB_active_record();
$email = new CI_Email();
$form_validation = new CI_Form_validation();
$input = new CI_Input();
$load = new CI_Loader();
$router = new CI_Router();
$session = new CI_Session();
$table = new CI_Table();
$unit = new CI_Unit_test();
$uri = new CI_URI();
Run Code Online (Sandbox Code Playgroud)

Pet*_*ley 7

添加CI的库路径作为项目的包含路径.

  1. PHP Explorer中,打开项目并右键单击Include Paths
  2. 从上下文菜单中选择" 配置 "
  3. 然后在"包含路径"对话框中,选择" 库"选项卡
  4. 单击添加外部文件夹...
  5. 浏览到CI的本地副本并选择它的库目录(无论它保存那些类文件)
  6. 单击"完成"

瞧,你去吧!

我应该注意,您还可以在项目创建时定义包含路径.