开发者

PHP Packages and Sub-Packages: What are they used for?

I've been using PHP for a few years now but I've never really used it for a large project, it's only usually little functionality upgrades I've given to websites.

I've just been given t开发者_运维问答he task of developing a project in PHP and I've been looking at the code for some real world examples of my proposed bespoke system and they all start with @package or @subpackage

As I've said, I've never had a necessity for these on my small scale projects before and I would very much like to understand them more so I could use them to my advantage.


Labels in comments that start with @ are used to generate the documentation by programs like PHPDocumentor. In particular @package is usually the project name (or something like a big section of the project) and @subpackage is a part of a @package, like a group of classes or a single class.


You define these @packages and @subpackages within the class docblock like this:

/**
 * Class description
 * 
 * @version    235
 * @changed    09/02/1971
 * @package    Intranet
 * @subpackage Client
 * @author     Micky Mouse 
 * @copyright  © 1960 Disneyland
 * 
 */
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜