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
*