我有:
class myClass {
function test($arg1,$arg2) {
echo $arg1 & $arg2;
}
}
$m = new myClass();
//can I use any kind of annotation to get argument-list of
$m->test(|
//加//
我猜 Netbeans 本身并不理解 m = myClass,所以像
$m = newClass();
/* @ var m = class newClass */
/* now nb can list the args when typing.. */
$m->test(
问候
如果要为每个
参数添加注释,请使用 phpdoc 注释(NetBeans 会自动为您完成注释):
只需输入
/**
在函数定义上方的行上,然后按enter
键。NetBeans 会自动在函数上方的空间中写入 phpdoc 注释。如果你的函数中有return
,phpdoc 也会为此编写:
/**
*
* @param type $arg1
* @param type $arg2
* @return type
*/
function myFunc($arg1, $arg2) {
$test = "";
return $test;
}
然后,您只需将type
替换为参数的数据类型,并在参数名称后添加注释。
在路上找到 [ctrl] + [空格],在
$m->test|