Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to document private variable in phpdoc

I am trying to document the private variable in phpdoc but its not documenting.

Here is my code:

class Content
{
    /**
    * simple db class variable
    * @access private
    */
    var $_db = null; // db
    private $_s3 = null; // s3

    /**
    * queue for mainting session queue1
    */
    public $queue = array();
}

The $_db and $_s3 both are not coming in documentation.

like image 312
XMen Avatar asked Apr 22 '26 10:04

XMen


1 Answers

That's what supposed to happen - setting @access private prevents the following code block from appearing in the documentation.

To get it to appear you need to use the command line switch --parseprivate

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

like image 96
darklion Avatar answered Apr 24 '26 00:04

darklion



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!