我试图在 phpdoc 中记录私有(private)变量,但它没有记录。
这是我的代码:
class Content
{
/**
* simple db class variable
* @access private
*/
var $_db = null; // db
private $_s3 = null; // s3
/**
* queue for mainting session queue1
*/
public $queue = array();
}
$_db
和 $_s3
都没有出现在文档中。
最佳答案
这就是应该发生的情况 - 设置 @access private
可防止以下代码块出现在文档中。
要让它出现,您需要使用命令行开关 --parseprivate
参见 http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.access.pkg.html
关于php - 如何在phpdoc中记录私有(private)变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5165431/