欢迎各位兄弟 发布技术文章
这里的技术是共享的
yiilite.php
from index:File → Settings → IDE Settings → File Types
.yiilite.php
to Ignore files and folders
.File → Settings → Project settings → Directories
.framework/cli/views
, protected/runtime
and assets
as excluded
.resource root
.File → Settings → Project settings → PHP → PHP Home
.File → Settings → Project settings → PHP → PHP Home → Add
.framework
directory.File → Settings → Project settings → PHP → PHP Home → Add
.Ctrl+Space
.Ctrl+Q
.In order to be able to get from render
or renderPartial
to the view, from widget
to widget class, fromrelations
to model classes you need to install additional plugin called YiiStorm.
You should install PHPUnit to run unit tests.
Run → Edit configurations
.Name
: anything.Test
: depending on what do you want to test select an appropriate option. Specify path.Use XML configuration file
: specifying path to phpunit.xml
. Often it'spath_to_your_webroot/protected/tests/phpunit.xml
.SHIFT+F10
.你需要安装 PHPUnit 来运行这些测试.
OK,现在这样就可以简单的支持yii framework了。
最新的phpstorm能智能识别yii的framework:
当用yiic创建的项目以后,需要手工做一些设置
File, Settings(mac下是phpstorm,preference),Project Setting ,Directories
标记当前项目的protected/runtime, assets为excluded
标记工程项目的根目录为resource root
点击Add Content Root,把yii框架的路径添加进来,标记cli/views目录为excluded
另外,需要排除yiilite.php,否则会补全多次,File,Settings,File Types,右下角的ignore files里面添加yiilite.php
注:本文转自 http://www.icultivator.com/p/524.html
来自 http://www.yiichina.com/tutorial/41