phpdoc:记录常量的正确方法是什么

Mat*_*tty 5 php phpdoc

是否有正确的方法来记录使用的常量define()?@var真的没有意义.我唯一能想到的是省略标记,只需在PHPdoc注释中编写描述即可.

ash*_*azg 6

phpDocumentor无法识别或使用@const标记.当phpDocumentor在代码中看到"define"关键字时,它会识别一个常量.它的输出模板将显示输出文档中的所有常量,列为常量.constant的docblock中唯一需要的是描述,尽管如果你觉得你需要它们,还允许使用许多其他"标准"标签[1].

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