php框架 - Yii2自己写的组件为何phpstorm无法识别呢?

WBOY
Release: 2016-06-06 20:16:04
Original
1095 people have browsed it

这样配置的组件,phpstorm不能提示组件内的方法和属性。

<code>'components'=>[
    'box'=>[
        'class'=>'frontend\components\Box'
    ]
]</code>
Copy after login
Copy after login

回复内容:

这样配置的组件,phpstorm不能提示组件内的方法和属性。

<code>'components'=>[
    'box'=>[
        'class'=>'frontend\components\Box'
    ]
]</code>
Copy after login
Copy after login

<code>/** @var \frontend\components\Box $test */
$test = Yii::$app->box;</code>
Copy after login

参考资料
http://www.yiichina.com/tutorial/487

视频
http://pan.baidu.com/share/link?shareid=1801456562&uk=1191547431&fid=322257966212691
http://www.tudou.com/programs/view/UuM-7fbcLj4/

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template