The @package tag is used to categorize Structural Elements into logical subdivisions.
@package [level 1]\[level 2]\[etc.]
The @package tag can be used as a counterpart or supplement to Namespaces. Namespaces provide a functional subdivision of Structural Elements where the @package tag can provide a logical subdivision in which way the elements can be grouped with a different hierarchy.
If, across the board, both logical and functional subdivisions are equal is it NOT RECOMMENDED to use the @package tag, to prevent maintenance overhead.
Each level in the logical hierarchy MUST be separated with a backslash (\) to be familiar to Namespaces. A hierarchy MAY be of endless depth but it is RECOMMENDED to keep the depth at less or equal than six levels.
Note: phpDocumentor also allows the underscore (_) and dot (.) as separator for compatibility with existing projects. Despite this the backslash is RECOMMENDED as separator.
Please note that the @package applies to different Structural Elements depending where it is defined.
This tag MUST NOT occur more than once in a PHPDoc.
Structural Elements tagged with the @package tag are grouped and organized in their own sidebar section.
1 2 3
/** * @package PSR\Documentation\API */