2

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.

1 Answer 1

9

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

Sign up to request clarification or add additional context in comments.

1 Comment

It's actually -pp or --parseprivate, but otherwise this answer is correct. Private items are not included in documentation by default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.