gpt4 book ai didi

phpDocumentor 2.0 页面级 DocBlock - 它在哪里?

转载 作者:行者123 更新时间:2023-12-04 02:03:35 26 4
gpt4 key购买 nike

我有一组类,每个类都在自己的文件中。我已经添加了适当的 DocBlock,这样我在构建文档时就不会收到任何错误或警告。这是一个非常简单的例子:

<?php
/**
* Page level description.
*/

/**
* Short class description.
*
* Longer description on what this class is all about.
*/
class Test {
// a bunch of code
}
?>

当我在此类上运行 phpdoc 时,页面级 DocBlock 不会出现在生成的 HTML 中的任何位置。

这可能是因为 2.0 版本仍处于 Alpha 阶段。如果我确实遗漏了什么,有人可以告诉我我遗漏了什么吗?

顺便说一句,我确实做了功课试图找到答案。我找到了 this post从 2 个月前开始,但它引用了 phpDocumentor 的早期版本,并且它看起来不像 OP 指定它是否满意地回答了问题。

最佳答案

[...] a Page-level DocBlock is the first DocBlock in a file if it contains a @package tag. [...]

<?php
/**
* Page-level DocBlock
* @package pagepackage
*/
/**
* Define DocBlock
*/
define("ahhhh","Now the Page-level DocBlock is for the page, and the Define DocBlock for the define");
?>

引用: http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_elements.pkg.html

关于phpDocumentor 2.0 页面级 DocBlock - 它在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14552777/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com