phpstorm代码自动补全, CodeIgniter3 & HMVC

PhpStorm-CI

HMVC: https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc

配置

先下载到本地:

git clone https://github.com/ganl/PhpStorm-CI.git

方法一:设置Include Paths

在项目目录中External Libraries上右键,选择Configure PHP Include Pahts

添加PhpStorm-CI/CodeCompletion所在位置的绝对路径。

方法二:设置Content Root

Windows:菜单 File > Settings > Directories > Add Content Root ,选择PhpStorm-CI/CodeCompletion

Mac: Preferences(comand+,)> Directories > Add Content Root ,选择PhpStorm-CI/CodeCompletion

CodeIgniter Specific

将CI的Controller和Model设为Plain text

  • system/core/Controller.php
  • system/core/Model.php
  • application/third_party/MX/Controller.php (mx_controller)

让自己的类库和模型方法能够自动提示补全,在my_cc.php文档块部分增加相应的model和library即可

 * ***************** YOUR MODELS *****************
 * @property user_model             $user_model
 *
 * ***************** YOUR LIBRARIES *****************
 * @property Migrate                $migrate               Migrate Class
 *

效果

Origin Repo : https://github.com/topdown/phpStorm-CC-Helpers

未经允许不得转载:ganlei的个人博客 » phpstorm代码自动补全, CodeIgniter3 & HMVC

赞 (2)
分享到:更多 ()