views:

66

answers:

2

Hi,

can someone explain or give some examples how to use the @Category Tag the right way ? PHPDocumentator is not parsing the Tag.

How does an correct File-DocBlock and Class-DocBlock looks like ?

+1  A: 

I don't know if this helps, but... From the manual:

The @category tag is used to organize groups of packages together. This is directly applicable to the XML:DocBook/peardoc2 Converter, and can be used by other converters. Other Converters packaged with phpDocumentor ignore the category, but this may change in future versions. It is also possible to dynamically specify category using the -dc, --defaultcategoryname command-line switch.

/**
 * Page-Level DocBlock
 * @package MyPackage
 * @category mycategory
 */

/**
 * @global array used for stuff
 */
function mine()
{
    global $baz;
    ...
}

Also, here's a sample of the proper way to write PEAR code, including DocBlocks with @category.

Please post some sample code that's not parsing -- that may help in answering what's wrong.

Josh
A: 

I haven't been able to find any useful examples on how to use the @category tag. It made sense to me to use it to represent the MVC layers using that tag ie:

/**
 * Layout or template
 * 
 * @category view
 */

/**
 * Database representation of the user
 * 
 * @category model
 */

/**
 * Login actions
 * 
 * @category controller
 */

That's how I use it.

StR