theseer / phpdox

Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT)
http://phpdox.de
Other
599 stars 121 forks source link

Include all files, not just classes #302

Closed MikeDombo closed 7 years ago

MikeDombo commented 7 years ago

It would be great if phpdox would include generated documentation not just for classes, but for all files with documentation included.

If this is already possible, then please let me know how.

theseer commented 7 years ago

I'm not exactly sure as to what you expect phpDox to do here, as phpDox does not actually care about the file it found the class, trait or interface in. Theoretically, you can have all code in one single file and the generated documentation would not look any different.

During the collection phase, all files that can be found based on the configured include/exclude criteria will be processed and all classes, traits and interfaces will be extracted.

PhpDox does not really process "documentation" unless it's a docblock and related to a class/trait/interface, method, property or class constant.

For now, i have no intention to change that as I don't see a usecase? Am I missing anything?

MikeDombo commented 7 years ago

I mean that I have a file that contains some functions that are not in a class, they just get included into other files. PhpDox includes these files in the "source" pages, but it only shows the source, not the documentation compiled into a nice format like it does for classes.

theseer commented 7 years ago

Okay, I get your point now. I'm still not convinced though, phpDox should handle those files as pretty much everything phpDox is doing or will be doing if i have time to finally implement it, will only make sense for object oriented software. As the code contained within these files will not be related to any class, interface or trait there currently is no place to show their content. And it is likely to require quite some changes to the collector.

I'll consider implementing it, but it's not very high on the priority list.

MikeDombo commented 7 years ago

OK, thank you for understanding, I just wanted to make sure I wasn't missing some obvious option to make that work.