XMen
XMen

Reputation: 30276

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.

Upvotes: 2

Views: 5080

Answers (1)

darklion
darklion

Reputation: 1055

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

Upvotes: 9

Related Questions