dpp89959 2013-01-17 19:06
浏览 59
已采纳

CakePHP中的PhpStorm代码自动完成

I have a controller in CakePHP 2.2 application.
I use PhpStorm 4.0.1 as IDE.

In MyController.php file I declare this:

/**
 * @property MyUtilComponent $MyUtil
 */
  1. Inside my controller, when I write $this-> I can select "MyUtilComponent" from drop down list. enter image description here

  2. But when I write $this->MyUtilComponent-> no function name option comes to select. enter image description here

  3. When I write $this->MyUtil->addThis(); and then click to addThis word and "Go to declaration", then PhpStorm goes to method's declaration successfully.

What should I do more to get function names autocompletion ?

Note: The behaviour is same for the core components.

  • 写回答

1条回答 默认 最新

  • duanjieyi6582 2013-01-17 21:34
    关注

    Update your PHPStorm. Version 5.0.4 is currently released and works the way you want it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?