Packages » Package freddy » File documentingpackages.txt

Package freddy, documentation file documentingpackages.txt

You can create package-wide documentation that can be incorporated with the documentation that Freddy produces from your PHP source files. This documentation is kept under the .freddy directory, that is located in the same directory where package classes are kept:


  /freeform-home/
     /packages/
         /mypackage          - the package
             /.freddy        - the package-wide documentation is kept under this folder
             /resources
             MyClass.php5
             MyOtherClass.php5
             ...
         ...
     ...


The main file is the package.txt file that holds the package documentational comment. It follows the syntax of a general documentational comment you use with class or method declaration, but is kept in the package.txt file. The information from this file is retrieved by package viewer to provide the package description in the packages list and to provide package details in the package view, like authors, related documents etc.

The need for this file is because there is no such syntactical element as a package (you do not declare package in the PHP source code), so there is no place for a documentational comment for it - so you can view this file as a virtual placeholder for a package doccomment.

In the .freddy subfolder you also place other documents like other text or media files. You can even create subdirectories under the .freddy directory to separate content.

Each text file besides the package.txt can be linked to from other files or documentational comments with the tag:

<doc package="packageName" file="fileName">Description of link</doc>

The file attribute is required; if the package directive is omitted, the file will be looked in the same package.

This construct can appear anywhere in the description of an item or in a directive description. You can also distribute images to supplement your package documentation. You include them with the <image> tag:

<image file="fileName" />,

that will try to insert the image specified by fileName in the generated documentation. You can also specify attributes for image formatting like with the img tag.

Related documents