Support for page-level doc blocks
Closed this issue · 2 comments
PHPDocumentor supports page-level documentation blocks, which describe the file itself, not the element following it.
In recent PHPDocumentor versions the logic to detect those is: first comment containing a @Package tag documents the file.
I would like to see support for this with phpdoctor, too.
At least it should be possible to not have those page-level blocks get assigned/used for the first var following it.
PHPDoctor doesn't have a concept of a file, only of code structures, so I'm not sure where a page-level comment would end up in the documentation. What did you have in mind?
It would be hard to not assign a page-level block to a code structure following it if it doesn't have a docblock of it's own. The PHPDocumentor way of treating the first docblock that has a @Package tag doesn't allow you to place the first item in the file into a package without first having a page-level block.
This has now been added. It treats the first comment in a file as a file level comment unless it is followed by a programElement. File level comments are added to the new processed source code docs in the standard doclet.