用phpDocumentor记录PHP常量(定义)的正确方法是什么 [英] What is the correct way to document PHP constants (define) with phpDocumentor

查看:71
本文介绍了用phpDocumentor记录PHP常量(定义)的正确方法是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何记录( phpDocumentor )常量,该常量由 define()在PHP中?

How must we document (with phpDocumentor) constants defined with define() in PHP?

文档中没有任何内容,但是在sample2.php中找到了以下示例(我看不到它的用法):

I found nothing in the docs, but found the following example (which I don't see it's use) in the sample2.php:

/**#@+
 * Constants
 */
/**
 * first constant
 */
define('testing', 6);
/**
 * second constant
 */
define('anotherconstant', strlen('hello'));

任何人都可以告诉我,用phpDocumentor在PHP中记录常量的最佳方法是什么?

Anyone can tell me what's the best way to document constants in PHP with phpDocumentor?

推荐答案

Define语句通常仅使用描述性文本进行注释,因此基本上可以用它来注释。

Define statements are in general only commented with a descriptive text, so that's basically how you comment it.

要了解有关DocBlock模板标签的更多信息, / **#@ + ,请查看手册页

To read more about the DocBlock template tag, /**#@+, check out the manual page.

这篇关于用phpDocumentor记录PHP常量(定义)的正确方法是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆