Page 1 of 1

phpDocumentor - Problems @package/@subpackage and @access

Posted: Thu Feb 26, 2004 8:08 am
by markbeadle
Hello All,

Sorry for the long post, but trying to use phpDocumentor for the first time. Probably a really simple error but I have a class which I am trying to define comments.
Errors:@package not found.
Private items output.

Anyone see quickly why ?

Using .ini file with

Code: Select all

;; show elements marked @access private in documentation by setting this to on
;; legal values: on, off
parseprivate = off

;; what is the main package?
;; legal values: alphanumeric string plus - and _
defaultpackagename =CompanyName
running on Suse Linux command line >phpdoc -c my.ini

Simplified code as follows

Code: Select all

<?php

     /**
      * Short file description.
      *
      * Long file description.
      *
      * @version 1.1
      * @access public
      * @package TopLevel
      */

    /**
    * Short Desc
    *
    * <p>Long Desc 1</p>
    * <p>Long Desc 2</p>
    *
    * @subpackage Mysub
    */
    class myClass
    &#123;
       /**#@+
         * @var array
         * @access private
         */
         var $array1;
         var $array2;
        /**#@-*/


       /**#@+
         * @var string
         * @access private
         */
        var $string1;
        var $string2;
        /**#@-*/

        /**
        * Constructor
        *
        * This constructor does xyz
        *
        * @param    integer $x description of this param
        * @param    string $y description of this param
        * @version  1.0
        */
        function myClass ($x,$y) &#123;
               //  Constructor Code
        &#125;

        /**
         * method1 ShortDesc
         *
         * method1 Long Desc
         *
         * @param    string $var Description of this param
         * @version  1.0
         */
        function method1($var)
        &#123;
                // Code Method 1
        &#125;

         /**
         * method2 ShortDesc
         *
         * method2 Long Desc
         *
         * @access   private
         * @param    string $var Description of this param
         * @version  1.0
         */
        function method1($var)
        &#123;
                // Code Method 1
        &#125;
    &#125;

?>

Thanks for any help.

Posted: Thu Feb 26, 2004 8:43 am
by twigletmac
Maybe because you have a @subpackage but no @package for the class? - try:

Code: Select all

/**
    * Short Desc
    *
    * <p>Long Desc 1</p>
    * <p>Long Desc 2</p>
    *
    * @package      Toplevel
    * @subpackage Mysub
    */
Mac

[SOLVED] Problems @package/@subpackage and @access

Posted: Thu Feb 26, 2004 8:54 am
by markbeadle
Thanks, knew it would be a simple solution.