2011-03-02 26 views
2

我想在phpdoc中記錄私有變量,但它不記錄。如何在phpdoc中記錄私有變量

這裏是我的代碼:

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都沒有在文檔到來。

回答

9

這就是應該發生的情況 - 設置@access private可防止在文檔中出現以下代碼塊。

讓它出現在你需要使用命令行開關--parseprivate

http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.access.pkg.html

+1

它實際上-pp或--parseprivate,但除此之外,這個答案是正確的。私人項目默認不包含在文檔中。 – ashnazg 2011-03-02 15:05:24

+0

感謝您的錯誤拾取,我已經更正了答案。 – darklion 2011-03-03 03:46:13