dongtangu6144 2009-07-03 16:36
浏览 46
已采纳

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

I'm looking for a good way to get autocomplete and click-for-reference (whatever that's called) for libraries in codeigniter working in Zend Studio for Eclipse.

for instance, if i do $this->load->library('dx_auth'); $this->dx_auth->get_user_id();

zend studio doesn't know what it is..

There is this sortof hacky way to do it (see below, source), but i feel like there should be a better way of doing it..

Anyone have any ideas?

// 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();
  • 写回答

4条回答 默认 最新

  • dougekui1518 2009-07-03 16:56
    关注

    Add CI's library path as an include path to your project.

    1. In the PHP Explorer, open your project and right-click on Include Paths
    2. Select Configure from the context menu
    3. Then in the include path dialog, select the Library tab
    4. Click Add External Folder...
    5. Browse to a local copy of CI and choose it's library directory (wherever it keeps those class files)
    6. Click Done

    Voila, there you go!

    I should note that you can also define include paths at the time of project creation.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥60 fail to initialize keyboard hotkeys through kernel.0000000000
  • ¥15 Centos7 / PETGEM
  • ¥15 csmar数据进行spss描述性统计分析
  • ¥15 各位请问平行检验趋势图这样要怎么调整?说标准差差异太大了
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 wpf界面一直接收PLC给过来的信号,导致UI界面操作起来会卡顿
  • ¥15 init i2c:2 freq:100000[MAIXPY]: find ov2640[MAIXPY]: find ov sensor是main文件哪里有问题吗
  • ¥15 运动想象脑电信号数据集.vhdr
  • ¥15 三因素重复测量数据R语句编写,不存在交互作用
  • ¥15 微信会员卡等级和折扣规则