문제

I name my classes as such:

Folder_SubFolder_SubFolder_ClassName{}

Which as we all know, creates a folder directory as such: Folder/SubFolder/SubFolder/ClassName.php

Now I document this class as such:

/**
 * Some title
 *
 * Some Description
 *
 * @package Folder_SubFolder_SubFolder
 */
Folder_SubFolder_SubFolder_ClassName{}

Now I use http://www.phpdoc.org/ and when I run: $ phpdoc -d . -t docs I get a print out like this:

enter image description here

Should the things like AisisCore_path_to_class not be in a folder called AisisCore? Am I doing something wrong in my documentation? Because honestly, this looks like a mess.

도움이 되었습니까?

해결책

If you want those things to all fall into "AsisCore", then you need to use "@package AsisCore" for everything rather than including the Subfolder pieces in the package name.

Whatever you use as the "package" name is what will be used to group classes together. By including those Subfolder pieces in the package name string, you are telling phpDocumentor to treat, for example, "AsisCore_Template" as something separate and unrelated to "AsisCore_Template_Helpers_Loop".

Looking over the list of your output, I'd probably choose to include either zero, or at most one, Subfolder level in the package name. When you then view one package's main page, you'll see that the class names themselves help group things together in the listing order, simply because you are following the PSR-0 / PEAR naming convention.

다른 팁

Try it with backslashes.

as in:

@package Folder\SubFolder\SubFolder
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top