2011-02-14 56 views

回答

6

phpDocumentor的不承认或利用@const标签。 phpDocumentor在代码中看到“define”关键字时就会识别出一个常量。其输出模板将显示输出文档中的所有常量,列为常量。常数的docblock中唯一需要的是描述,尽管如果你觉得你需要它们,许多其他的“标准”标签都是允许的[1]。

[1] - http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_elements.pkg.html#procedural.define

1

使用@const

/** 
    * @const FOO Bar 
    */ 
define('FOO', 'Bar'); 

Documentation(对不起,唯一的文档我能看到的是德语。)

+0

我确实遇到过这种情况,但是,我无法在其他任何地方找到它,NetBeans也没有向其显示自动完成提示。 – Matty 2011-02-14 18:28:28

相关问题