View Mdoc internals of Class1

Array
(
    [main] => Array
        (
            [language] => PHP
            [type] => class
            [name] => Class1
            [source] => Array
                (
                    [comment] => /**
 * Syntactically correct PHP5 class example.
 *
 * Every code documenting block, 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.
 *
 * For PHP interpreter, the default scope is "public" (so @private 
 * and @protected should not be forgotten in PHP4 classes).
 *
 * @version   1.0
 * @date      28 Aug 2005
 */
                    [declaration] => class Class1 extends Parent1 implements Interface1, Interface2
                    [line] => 39
                    [extends] => Parent1
                    [implements] => Array
                        (
                            [0] => Interface1
                            [1] => Interface2
                        )

                )

            [description] => Array
                (
                    [short] => Syntactically correct PHP5 class example.
                    [long] => Every code documenting block, 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.

For PHP interpreter, the default scope is "public" (so @private 
and @protected should not be forgotten in PHP4 classes).
                )

            [info] => Array
                (
                    [version] => 1.0
                    [date] => 28 Aug 2005
                )

            [constants] => 4
        )

    [constant] => Array
        (
            [Class1::START] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* A "member" constant.
 *
 * As of PHP5, constant can be declared in a class, with the new "const"
 * statement and is accessed with class member syntax even within the class
 * itself. Their scope is global assuming to use class member syntax.
 *
 * [code]
 * // A class constant is accessed with class member syntax
 * class Test {
 *
 *   const HELLO = "Hello world!";
 *
 *   function __construct() {
 *     echo Test::HELLO;  // even within the class
 *   }
 * }
 * // Accessing the class constant in global scope
 * echo Test::HELLO;
 *
 * @type int
 */
                            [code] => const START = 0;
                            [value] => 0
                            [line] => 63
                        )

                    [description] => Array
                        (
                            [short] => A "member" constant.
                            [long] => As of PHP5, constant can be declared in a class, with the new "const"
statement and is accessed with class member syntax even within the class
itself. Their scope is global assuming to use class member syntax.

[code]
// A class constant is accessed with class member syntax
class Test {

  const HELLO = "Hello world!";

  function __construct() {
    echo Test::HELLO;  // even within the class
  }
}
// Accessing the class constant in global scope
echo Test::HELLO;
                        )

                    [info] => Array
                        (
                            [type] => int
                        )

                )

        )

    [constant_group] => Array
        (
            [1] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* New line chars.
 *
 * This chars are celared in a group of constants, so their inline
 * comments in code are considered for documenting.
 */
                            [code] => const NL_DOS = "\r\n";  // for Windows environment
const NL_MAC = "\r";    // for Mac environment
const NL_NIX = "\n";    // for Unix/Linux environment
                            [line] => 71
                        )

                    [description] => Array
                        (
                            [short] => New line chars.
                            [long] => This chars are celared in a group of constants, so their inline
comments in code are considered for documenting.
                        )

                    [constant] => Array
                        (
                            [Class1::NL_DOS] => Array
                                (
                                    [line] => 71
                                    [comment] => for Windows environment
                                    [code] => const NL_DOS = "\r\n";
                                    [value] => "\r\n"
                                )

                            [Class1::NL_MAC] => Array
                                (
                                    [line] => 72
                                    [comment] => for Mac environment
                                    [code] => const NL_MAC = "\r";
                                    [value] => "\r"
                                )

                            [Class1::NL_NIX] => Array
                                (
                                    [line] => 73
                                    [comment] => for Unix/Linux environment
                                    [code] => const NL_NIX = "\n";
                                    [value] => "\n"
                                )

                        )

                )

        )

    [property] => Array
        (
            [anint] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* Integer property.
 *
 * A private integer property set to 27.
 */
                            [code] => private static $anint = 27;
                            [initial] => 27
                            [line] => 80
                            [member] => private static
                        )

                    [info] => Array
                        (
                            [private] => yes
                            [static] => yes
                            [type] => 
                        )

                    [description] => Array
                        (
                            [short] => Integer property.
                            [long] => A private integer property set to 27.
                        )

                )

            [apsint] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* Protected and static integer property.
 *
 * This property has an initial value.
 *
 * @type int
 */
                            [code] => protected static $apsint = 0;
                            [line] => 89
                            [member] => protected static
                        )

                    [info] => Array
                        (
                            [protected] => yes
                            [static] => yes
                            [type] => int
                        )

                    [description] => Array
                        (
                            [short] => Protected and static integer property.
                            [long] => This property has an initial value.
                        )

                )

            [mixer] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* Mixed property.
 *
 * The "type" comment is required so if 
 * property type isn't sure, use "mixed".
 *
 * @type mixed
 */
                            [code] => public $mixer;
                            [line] => 99
                            [member] => public
                        )

                    [info] => Array
                        (
                            [public] => yes
                            [type] => mixed
                        )

                    [description] => Array
                        (
                            [short] => Mixed property.
                            [long] => The "type" comment is required so if 
property type isn't sure, use "mixed".
                        )

                )

            [privob] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* Private property.
 *
 * @type object
 */
                            [code] => private $privob;
                            [line] => 106
                            [member] => private
                        )

                    [info] => Array
                        (
                            [private] => yes
                            [type] => object
                        )

                    [description] => Array
                        (
                            [short] => Private property.
                        )

                )

            [protob] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* Protected property.
 *
 * @type object
 */
                            [code] => protected $protob;
                            [line] => 113
                            [member] => protected
                        )

                    [info] => Array
                        (
                            [protected] => yes
                            [type] => object
                        )

                    [description] => Array
                        (
                            [short] => Protected property.
                        )

                )

            [multi] => Array
                (
                    [source] => Array
                        (
                            [comment] => /**
* Stack of XHTML formated output string.
 *
 * This property has a "multiline" initial value.
 *
 * @type array
 */
                            [code] => public static $multi = array(
                         'next' => "
", 'nl' => "
", 'trap' => "a ; to trap value parsing", ); [initial] => array( 'next' => "
", 'nl' => "
", 'trap' => "a ; to trap value parsing", ) [line] => 122 [member] => public static ) [info] => Array ( [public] => yes [static] => yes [type] => array ) [description] => Array ( [short] => Stack of XHTML formated output string. [long] => This property has a "multiline" initial value. ) ) ) [method] => Array ( [__construct] => Array ( [source] => Array ( [comment] => /** * Constructor with PHP5 class syntax. * * Print an instance creation message. * * @public * @return (object) an instance of this class (@return comment * is mandatory for any member function) */ [code] => function __construct() { echo "A new instance has been created."; } [line] => 137 [return_type] => object [parameters] => void [member] => public ) [description] => Array ( [short] => Constructor with PHP5 class syntax. [long] => Print an instance creation message. ) [return] => Array ( [0] => Array ( [type] => object [description] => an instance of this class (@return comment is mandatory for any member function) ) ) [info] => Array ( [public] => yes ) ) [m3param] => Array ( [source] => Array ( [comment] => /** * A method with 3 parameters. * * @param (string) $p1 the first parameter * @param (int) $p2 the second parameter * @param (string) $p3 the 3rd parameter * @return (void) */ [code] => protected function m3param($p1, int $p2, string $p3) { // Print the 3 parameters echo $p1 . "\n"; echo $p2 . "\n"; echo $p3 . "\n"; return true; } [line] => 150 [return_type] => void [parameters] => string p1, int p2, string p3 [member] => protected ) [info] => Array ( [protected] => yes ) [description] => Array ( [short] => A method with 3 parameters. ) [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] => string [default] => [reference] => [description] => the 3rd parameter ) ) [return] => Array ( [0] => Array ( [type] => void [description] => ) ) ) [mpbyref] => Array ( [source] => Array ( [comment] => /** * A method with parameters passed by reference. * * The function statement presents the & reference char in * different places (& $p1 and &$p2). * * @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] => private function mpbyref(& $p1, bool &$p2) { return $p1; } [line] => 172 [return_type] => string [parameters] => string p1, bool p2 [member] => private ) [info] => Array ( [private] => yes [warning] => unstable ) [description] => Array ( [short] => A method with parameters passed by reference. [long] => The function statement presents the & reference char in different places (& $p1 and &$p2). ) [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 ) ) ) [mnop] => Array ( [source] => Array ( [comment] => /** * A method with no parameter. * * @return (void) */ [code] => final private function mnop() { print get_class_name($this); } [line] => 182 [return_type] => void [parameters] => void [member] => private final ) [info] => Array ( [final] => yes [private] => yes ) [description] => Array ( [short] => A method with no parameter. ) [return] => Array ( [0] => Array ( [type] => void [description] => ) ) ) [mlotdoc] => Array ( [source] => Array ( [comment] => /** * A method with significant documenting comments. * * Unordered list is a sequence of lines starting all with same -+* bullet, * indented on same column at least 2 spaces from margin star, so * * - list item 1 * on two lines * - second item * - another list item * + sublist it1 * + sublist it2 * * subsub A * * subsub B * * subsub C * - another ? * again! * * is translate into an HTML unordered list (max 8 items by list, * nested up to 4 levels) * * @warning unstable * @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 * several lines * - list item A * - list item B * @param (array) $p4 the address 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] => public function mlotdoc($p1, $p2 = "a string", $p3 = "another string", $p4 = array()) { if ($p1) { return; } else { return "whatever"; } } [line] => 225 [return_type] => mixed [parameters] => int p1 [, mixed p2 [, string p3 [, array p4]]] [member] => public ) [info] => Array ( [public] => yes [warning] => unstable ) [description] => Array ( [short] => A method with significant documenting comments. [long] => Unordered list is a sequence of lines starting all with same -+* bullet, indented on same column at least 2 spaces from margin star, so - list item 1 on two lines - second item - another list item + sublist it1 + sublist it2 * subsub A * subsub B * subsub C - another ? again! is translate into an HTML unordered list (max 8 items by list, nested up to 4 levels) ) [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 several lines - list item A - list item B ) [p4] => Array ( [type] => array [default] => array() [reference] => [description] => the address 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) ) ) ) [hello] => Array ( [source] => Array ( [comment] => /** * Very simple method with PHP4 style. * * This method is declared like it would be in a PHP4 class. * * @return (void) */ [code] => function hello() { echo "Hello world!"; } [line] => 241 [return_type] => void [parameters] => void [member] => public ) [description] => Array ( [short] => Very simple method with PHP4 style. [long] => This method is declared like it would be in a PHP4 class. ) [return] => Array ( [0] => Array ( [type] => void [description] => ) ) ) ) [constructor] => Array ( [source] => Array ( [comment] => /** * Constructor with PHP5 class syntax. * * Print an instance creation message. * * @public * @return (object) an instance of this class (@return comment * is mandatory for any member function) */ [code] => function __construct() { echo "A new instance has been created."; } [line] => 137 [return_type] => object [parameters] => void [member] => public ) [description] => Array ( [short] => Constructor with PHP5 class syntax. [long] => Print an instance creation message. ) [return] => Array ( [0] => Array ( [type] => object [description] => an instance of this class (@return comment is mandatory for any member function) ) ) [info] => Array ( [public] => yes ) ) [public_method] => Array ( [__construct] => Array ( [source] => Array ( [comment] => /** * Constructor with PHP5 class syntax. * * Print an instance creation message. * * @public * @return (object) an instance of this class (@return comment * is mandatory for any member function) */ [code] => function __construct() { echo "A new instance has been created."; } [line] => 137 [return_type] => object [parameters] => void [member] => public ) [description] => Array ( [short] => Constructor with PHP5 class syntax. [long] => Print an instance creation message. ) [return] => Array ( [0] => Array ( [type] => object [description] => an instance of this class (@return comment is mandatory for any member function) ) ) [info] => Array ( [public] => yes ) ) [mlotdoc] => Array ( [source] => Array ( [comment] => /** * A method with significant documenting comments. * * Unordered list is a sequence of lines starting all with same -+* bullet, * indented on same column at least 2 spaces from margin star, so * * - list item 1 * on two lines * - second item * - another list item * + sublist it1 * + sublist it2 * * subsub A * * subsub B * * subsub C * - another ? * again! * * is translate into an HTML unordered list (max 8 items by list, * nested up to 4 levels) * * @warning unstable * @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 * several lines * - list item A * - list item B * @param (array) $p4 the address 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] => public function mlotdoc($p1, $p2 = "a string", $p3 = "another string", $p4 = array()) { if ($p1) { return; } else { return "whatever"; } } [line] => 225 [return_type] => mixed [parameters] => int p1 [, mixed p2 [, string p3 [, array p4]]] [member] => public ) [info] => Array ( [public] => yes [warning] => unstable ) [description] => Array ( [short] => A method with significant documenting comments. [long] => Unordered list is a sequence of lines starting all with same -+* bullet, indented on same column at least 2 spaces from margin star, so - list item 1 on two lines - second item - another list item + sublist it1 + sublist it2 * subsub A * subsub B * subsub C - another ? again! is translate into an HTML unordered list (max 8 items by list, nested up to 4 levels) ) [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 several lines - list item A - list item B ) [p4] => Array ( [type] => array [default] => array() [reference] => [description] => the address 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) ) ) ) [hello] => Array ( [source] => Array ( [comment] => /** * Very simple method with PHP4 style. * * This method is declared like it would be in a PHP4 class. * * @return (void) */ [code] => function hello() { echo "Hello world!"; } [line] => 241 [return_type] => void [parameters] => void [member] => public ) [description] => Array ( [short] => Very simple method with PHP4 style. [long] => This method is declared like it would be in a PHP4 class. ) [return] => Array ( [0] => Array ( [type] => void [description] => ) ) ) ) [private_method] => Array ( [mpbyref] => Array ( [source] => Array ( [comment] => /** * A method with parameters passed by reference. * * The function statement presents the & reference char in * different places (& $p1 and &$p2). * * @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] => private function mpbyref(& $p1, bool &$p2) { return $p1; } [line] => 172 [return_type] => string [parameters] => string p1, bool p2 [member] => private ) [info] => Array ( [private] => yes [warning] => unstable ) [description] => Array ( [short] => A method with parameters passed by reference. [long] => The function statement presents the & reference char in different places (& $p1 and &$p2). ) [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 ) ) ) [mnop] => Array ( [source] => Array ( [comment] => /** * A method with no parameter. * * @return (void) */ [code] => final private function mnop() { print get_class_name($this); } [line] => 182 [return_type] => void [parameters] => void [member] => private final ) [info] => Array ( [final] => yes [private] => yes ) [description] => Array ( [short] => A method with no parameter. ) [return] => Array ( [0] => Array ( [type] => void [description] => ) ) ) ) [protected_method] => Array ( [m3param] => Array ( [source] => Array ( [comment] => /** * A method with 3 parameters. * * @param (string) $p1 the first parameter * @param (int) $p2 the second parameter * @param (string) $p3 the 3rd parameter * @return (void) */ [code] => protected function m3param($p1, int $p2, string $p3) { // Print the 3 parameters echo $p1 . "\n"; echo $p2 . "\n"; echo $p3 . "\n"; return true; } [line] => 150 [return_type] => void [parameters] => string p1, int p2, string p3 [member] => protected ) [info] => Array ( [protected] => yes ) [description] => Array ( [short] => A method with 3 parameters. ) [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] => string [default] => [reference] => [description] => the 3rd parameter ) ) [return] => Array ( [0] => Array ( [type] => void [description] => ) ) ) ) [public_property] => Array ( [mixer] => Array ( [source] => Array ( [comment] => /** * Mixed property. * * The "type" comment is required so if * property type isn't sure, use "mixed". * * @type mixed */ [code] => public $mixer; [line] => 99 [member] => public ) [info] => Array ( [public] => yes [type] => mixed ) [description] => Array ( [short] => Mixed property. [long] => The "type" comment is required so if property type isn't sure, use "mixed". ) ) [multi] => Array ( [source] => Array ( [comment] => /** * Stack of XHTML formated output string. * * This property has a "multiline" initial value. * * @type array */ [code] => public static $multi = array( 'next' => "
", 'nl' => "
", 'trap' => "a ; to trap value parsing", ); [initial] => array( 'next' => "
", 'nl' => "
", 'trap' => "a ; to trap value parsing", ) [line] => 122 [member] => public static ) [info] => Array ( [public] => yes [static] => yes [type] => array ) [description] => Array ( [short] => Stack of XHTML formated output string. [long] => This property has a "multiline" initial value. ) ) ) [private_property] => Array ( [anint] => Array ( [source] => Array ( [comment] => /** * Integer property. * * A private integer property set to 27. */ [code] => private static $anint = 27; [initial] => 27 [line] => 80 [member] => private static ) [info] => Array ( [private] => yes [static] => yes [type] => ) [description] => Array ( [short] => Integer property. [long] => A private integer property set to 27. ) ) [privob] => Array ( [source] => Array ( [comment] => /** * Private property. * * @type object */ [code] => private $privob; [line] => 106 [member] => private ) [info] => Array ( [private] => yes [type] => object ) [description] => Array ( [short] => Private property. ) ) ) [protected_property] => Array ( [apsint] => Array ( [source] => Array ( [comment] => /** * Protected and static integer property. * * This property has an initial value. * * @type int */ [code] => protected static $apsint = 0; [line] => 89 [member] => protected static ) [info] => Array ( [protected] => yes [static] => yes [type] => int ) [description] => Array ( [short] => Protected and static integer property. [long] => This property has an initial value. ) ) [protob] => Array ( [source] => Array ( [comment] => /** * Protected property. * * @type object */ [code] => protected $protob; [line] => 113 [member] => protected ) [info] => Array ( [protected] => yes [type] => object ) [description] => Array ( [short] => Protected property. ) ) ) )