PHP 文档标签的含义:#@+和 #@-

发布于 2024-08-23 00:26:10 字数 283 浏览 1 评论 0原文

我在 Zend Framework 中找到了这个:

 /**#@+
 * @access protected
 */

/**
 * @var Zend_Mail_Transport_Abstract
 * @static
 */
protected static $_defaultTransport = null;

...

/**#@-*/

这些是“打开”和“关闭”标签吗? phpdoc 支持它们吗? 我找不到任何有关它的文档(并且无法通过谷歌搜索)

谢谢。

I found this in Zend Framework :

 /**#@+
 * @access protected
 */

/**
 * @var Zend_Mail_Transport_Abstract
 * @static
 */
protected static $_defaultTransport = null;

...

/**#@-*/

Are these "open" and "close" tags ? Are they supported by phpdoc ?
I can't find any documentation about it (and it's not possible to google it)

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

淡墨 2024-08-30 00:26:10

该字符串定义 docBlock 模板

That string defines a docBlock template.

冬天旳寂寞 2024-08-30 00:26:10

“文档块模板”是一组标签,您希望将其应用于模板标记内的所有单独文档块。在上面的示例中,您似乎希望将“@access protected”标签应用于标记内的所有 docblock'd 元素,从 $_defaultTransport 元素开始。

简而言之,这是避免重复的捷径。在您的示例中,您已经避免了在许多类变量的文档块中重复“@access protected”。

The "docblock template" is a set of tags that you want applied to all individual docblocks inside the template markers. In your example above, it appears that you want the "@access protected" tag applied to all docblock'd elements inside the markers, starting with the $_defaultTransport element.

In short, it's a shortcut to avoid duplication. In your example, you've saved yourself from duplicating "@access protected" across the docblocks of many class variables.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文