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

Description

@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.

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 applied to documented elements in the same way that @package is applied.

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).

NOTE: The @subpackage tag is intended to help categorize the elements that are in an actual @package value. Since PHP itself doesn't allow you to have two functions with the same name in the same script, PhpDocumentor also requires all names in an @package to be unique... meaning, @subpackage does not allow further "naming separation" inside that @package. What it does do is allow a level of visual grouping/separation of the elements inside that @package.

Example

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