开发者

Type hint for '$this' and other variables in phpFramework::view files? [duplicate]

开发者 https://www.devze.com 2023-01-09 06:10 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: Variable typ开发者_如何学Goe hinting in Netbeans (PHP)
This question already has answers here: Closed 12 years ago.

Possible Duplicate:

Variable typ开发者_如何学Goe hinting in Netbeans (PHP)

/EDIT

In php frameworks, in the views, $this refers to the controller object. But netbeans doesn't know this (I am guessing neither do other IDEs), so when I hit Ctrl + Space, the code completion doesnt work (says No Sugestions).

Is there some trick, or phpdoc directive that can tell the IDE the types of a variable that isn't declared in the current file (and there is no "include" or require_once either, because the php framework takes care of that by convention, so no explicit include is made).

Also in php frameworks there are other variables besides $this in the view.php files, but putting on the top of the file a php doc for them doesn't seem to do anything either.


Eclipse has method discovery, you should look into the PHP specialised versions of that - something like Aptana, or Zend Studio.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号