Add support for @source #3649
Replies: 5 comments
-
I assume you're talking about the inline {@source} tag, as described in PhpDocumentor1, i.e. Right? |
Beta Was this translation helpful? Give feedback.
-
Currently the parser of phpDocumentor already supports the --sourcecode argument; this will embed the file's source code in a compressed fashion inside the AST. There is also the sourcecode writer which transforms the sourcecode for an entire file. So basically the elements are there but the methods need to be enhanced with their source code |
Beta Was this translation helpful? Give feedback.
-
Vasil, you are correct. Mike, that is all true. The {@source} tag should tell the parser which method source code should be isolated and displayed with that method in the generated documentation. At least, that's how I see it at the moment. =] |
Beta Was this translation helpful? Give feedback.
-
And what about @filesource tag, which, according to documentation, is used to tell phpDocumentor 2 to include the source of the current file in the parsing results. Are there plans to make it alive? Or you tend to completely replace it by something new? |
Beta Was this translation helpful? Give feedback.
-
@techappossum I thought it was strange as well that the @filesource tag seemed to not work, but I think it depends on the template you are using for your documentation. The one I was using explicitly stated in the documentation that they weren't including any of that output. |
Beta Was this translation helpful? Give feedback.
-
There is currently no support for including code source for just the method/function which has the @source tag in it's docblock. This would be extremely convenient as it allows for the developer to not have to search around the code base for actual implementation.
Beta Was this translation helpful? Give feedback.
All reactions