View Mdoc internals of Lib1

Array
(
    [cvs] => Array
        (
            [Author] => jmfaure
            [Id] => Lib1.php,v 1.1.1.1 2006/01/05 10:37:20 jmfaure Exp
        )

    [main] => Array
        (
            [language] => PHP
            [type] => library
            [source] => Array
                (
                    [comment] => /**
 * Typical documented library, can be used as a code documenting tutorial.
 *
 * Every code documenting bloc, like this one, has the same format; the 
 * very first line is the "short description", following lines up to 
 * first @info is the "long description". Every @info comment starts a 
 * line with @ (more precisely \n * @ sequence); they are also called
 * active comments (sometimes written @ctive comments).
 *
 * The long description is optional.
 *
 * The long description can have some "display" formating block, such as
 * the [example] one or the [code] one.
 *
 * @warning   the @info fields must not have multiple entries in one
 *            documenting comment
 * @lib       Lib1
 * @version   1.0
 * @date      28 Aug 2005
 * @author    JM Faure  
 */
                )

            [description] => Array
                (
                    [short] => Typical documented library, can be used as a code documenting tutorial.
                    [long] => Every code documenting bloc, like this one, has the same format; the 
very first line is the "short description", following lines up to 
first @info is the "long description". Every @info comment starts a 
line with @ (more precisely \n * @ sequence); they are also called
active comments (sometimes written @ctive comments).

The long description is optional.

The long description can have some "display" formating block, such as
the [example] one or the [code] one.
                )

            [info] => Array
                (
                    [warning] => the @info fields must not have multiple entries in one
           documenting comment
                    [lib] => Lib1
                    [version] => 1.0
                    [date] => 28 Aug 2005
                    [author] => JM Faure 
                )

            [name] => Lib1
            [constants] => 4
        )

    [constant] => Array
        (
            [LIBT_ERRMSG_1] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* Constants can be declared with single documenting.
 *
 * Individual constant comment provides long description for every constant,
 * which makes you choose for block or individual constant documenting.
 *
 */
                            [code] => define("LIBT_ERRMSG_1", "A classical error message " . 
                        "which stands onto three " . 
                        "lines to be defined.");
                            [value] => "A classical error message " . 
                        "which stands onto three " . 
                        "lines to be defined."
                            [line] => 59
                        )

                    [description] => Array
                        (
                            [short] => Constants can be declared with single documenting.
                            [long] => Individual constant comment provides long description for every constant,
which makes you choose for block or individual constant documenting.
                        )

                )

        )

    [constant_group] => Array
        (
            [1] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* Constants can be declared in a block.
 *
 * The constant block has the standard code documenting block format. The
 * inline comments are used to document constant individualy (this is a 
 * format which suits well constants defined as a serie). These subcomments 
 * are optional.
 *
 * @experimental
 */
                            [code] => define("LIBT_CONST_ONE", 1);    // case flag ONE
define("LIBT_CONST_TWO", 2);    // case flag TWO
define("LIBT_CONST_THREE", 3);  // case flag THREE
                            [line] => 48
                        )

                    [description] => Array
                        (
                            [short] => Constants can be declared in a block.
                            [long] => The constant block has the standard code documenting block format. The
inline comments are used to document constant individualy (this is a 
format which suits well constants defined as a serie). These subcomments 
are optional.
                        )

                    [info] => Array
                        (
                            [experimental] => yes
                        )

                    [constant] => Array
                        (
                            [LIBT_CONST_ONE] => Array
                                (
                                    [line] => 48
                                    [comment] => case flag ONE
                                    [code] => define("LIBT_CONST_ONE", 1);
                                    [value] => 1
                                )

                            [LIBT_CONST_TWO] => Array
                                (
                                    [line] => 49
                                    [comment] => case flag TWO
                                    [code] => define("LIBT_CONST_TWO", 2);
                                    [value] => 2
                                )

                            [LIBT_CONST_THREE] => Array
                                (
                                    [line] => 50
                                    [comment] => case flag THREE
                                    [code] => define("LIBT_CONST_THREE", 3);
                                    [value] => 3
                                )

                        )

                )

        )

    [function] => Array
        (
            [f3param] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* A method example with 3 parameters.
 *
 * The three parameters have different declaration patterns.
 *
 * @experimental
 * @param (string) $p1 the first parameter
 * @param (int) $p2 the second parameter
 * @param (bool) $p3 the 3rd parameter
 * @return (void)
 */
                            [code] => function f3param($p1, $p2, $p3 = true) {

  // Print the 3 parameters
  echo $p1 . "\n";
  echo $p2 . "\n";
  echo $p3 . "\n";

  return true;
}
                            [line] => 74
                            [return_type] => void
                            [parameters] => string p1, int p2 [, bool p3]
                        )

                    [description] => Array
                        (
                            [short] => A method example with 3 parameters.
                            [long] => The three parameters have different declaration patterns.
                        )

                    [param] => Array
                        (
                            [p1] => Array
                                (
                                    [type] => string
                                    [default] => 
                                    [reference] => 
                                    [description] => the first parameter
                                )

                            [p2] => Array
                                (
                                    [type] => int
                                    [default] => 
                                    [reference] => 
                                    [description] => the second parameter
                                )

                            [p3] => Array
                                (
                                    [type] => bool
                                    [default] => true
                                    [reference] => 
                                    [description] => the 3rd parameter
                                )

                        )

                    [return] => Array
                        (
                            [0] => Array
                                (
                                    [type] => void
                                    [description] => 
                                )

                        )

                    [info] => Array
                        (
                            [experimental] => yes
                        )

                )

            [fpbyref] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* A method with parameters passed by reference.
 *
 * This comment line is to avoid the notice in log.
 * @warning  unstable
 * @param (string) $p1 the 1st parameter
 * @param (bool) $p2 the 2nd parameter
 *                   has a two-line comment
 * @return (string) the function result
 */
                            [code] => function fpbyref(& $p1, &$p2) {

  // No comment!
  return $p1;
}
                            [line] => 94
                            [return_type] => string
                            [parameters] => string p1, bool p2
                        )

                    [description] => Array
                        (
                            [short] => A method with parameters passed by reference.
                            [long] => This comment line is to avoid the notice in log.
                        )

                    [param] => Array
                        (
                            [p1] => Array
                                (
                                    [type] => string
                                    [default] => 
                                    [reference] => yes
                                    [description] => the 1st parameter
                                )

                            [p2] => Array
                                (
                                    [type] => bool
                                    [default] => 
                                    [reference] => yes
                                    [description] => the 2nd parameter
                  has a two-line comment
                                )

                        )

                    [return] => Array
                        (
                            [0] => Array
                                (
                                    [type] => string
                                    [description] => the function result
                                )

                        )

                    [info] => Array
                        (
                            [warning] => unstable
                        )

                )

            [flotdesc] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* A method with a lot of description and @info items.
 *
 * Long description of func3 method is spread onto
 * three
 * lines.
 *
 * @warning  unstable
 * @forfun  one line,
 *          two lines.
 * @param (int) $p1 the first parameter
 * @param (mixed) $p2 the title of text (string)
 *                    or false (bool) to get all
 * @param (string) $p3 the third parameter
 *                  is commented onto
 *                  three lines
 * @param (array) $p4 the a structured list:
 *                    'name' => a name
 *                    'address' => an address
 *                    'city' => a city name
 * @return (void) if echo flag $p1 is true
 *                a line of comment to test parsing
 *         (string) the printable solution if echo flag is false (default)
 */
                            [code] => function flotdesc($p1, $p2="a string", $p3 = "another string", $p4) {

  if ($p1) {
    return;
  } else {
    return "whatever";
  }
                            [line] => 124
                            [return_type] => mixed
                            [parameters] => int p1 [, mixed p2 [, string p3, array p4]]
                        )

                    [description] => Array
                        (
                            [short] => A method with a lot of description and @info items.
                            [long] => Long description of func3 method is spread onto
three
lines.
                        )

                    [param] => Array
                        (
                            [p1] => Array
                                (
                                    [type] => int
                                    [default] => 
                                    [reference] => 
                                    [description] => the first parameter
                                )

                            [p2] => Array
                                (
                                    [type] => mixed
                                    [default] => "a string"
                                    [reference] => 
                                    [description] => the title of text (string)
                   or false (bool) to get all
                                )

                            [p3] => Array
                                (
                                    [type] => string
                                    [default] => "another string"
                                    [reference] => 
                                    [description] => the third parameter
                 is commented onto
                 three lines
                                )

                            [p4] => Array
                                (
                                    [type] => array
                                    [default] => 
                                    [reference] => 
                                    [description] => the a structured list:
                   'name' => a name
                   'address' => an address
                   'city' => a city name
                                )

                        )

                    [return] => Array
                        (
                            [0] => Array
                                (
                                    [type] => void
                                    [description] => if echo flag $p1 is true
               a line of comment to test parsing
                                )

                            [1] => Array
                                (
                                    [type] => string
                                    [description] => the printable solution if echo flag is false (default)
                                )

                        )

                    [info] => Array
                        (
                            [warning] => unstable
                            [forfun] => one line,
         two lines.
                        )

                )

        )

)