@subpackage

(phpDocumentor 0.1+ )

@subpackage -- Specify sub-package to group classes or functions and defines into. Requires @package tag

Description

@subpackage sub-packagename

@subpackage works with @package to group php files together for documentation.

If found in a page-level DocBlock, specifies the sub-package that all functions and defines in the php file belong to.
If found in a class-level DocBlock, specifies the sub-package that the class belongs to.

Caution

If @package is not present in the same DocBlock, the @subpackage tag is ignored. A SUBPACKAGE NAME MUST BE ONE WORD WITH NO SPACES OR NEWLINES CONTAINING ONLY LETTERS, DIGITS, and "_", "-", "[" or "]"

A @subpackage tag is parsed in the same way that @package is parsed.

If a file contains functions and defines, they will be packaged by a page-level DocBlock. A page-level DocBlock is a DocBlock that is not paired with any phpDocumentor element (include, function, define, class, class function, class variable).

phpDocumentor parses a DocBlock as a page-level DocBlock if it precedes another DocBlock like this:

/**
* Page-Level DocBlock example.
* This DocBlock precedes another DocBlock and will be parsed as the page-level.  Put your @package and @subpackage tags here
* @package pagelevel_package
* @subpackage data
*/
/**
* function datafunction
*/
function datafunction()
{
...
}

A class-level DocBlock is any DocBlock that precedes a class definition in a php file.

<?php
/**
* class bluh
* class-level DocBlock example.
* @package applies_to_bluh
* @subpackage bluh
*/
class bluh
{
   /**
   * This variable is parsed as part of package applies_to_bluh, and subpackage bluh
   */
   var $foo;
	
   /**
   * So is this function
   */
   function bar()
   {
   }	
}
?>

See also @package