Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

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.

You must be logged in to vote

Replies: 5 comments

Comment options

I assume you're talking about the inline {@source} tag, as described in PhpDocumentor1, i.e.
http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.inlinesource.pkg.html

Right?

You must be logged in to vote
0 replies
Comment options

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

You must be logged in to vote
0 replies
Comment options

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. =]

You must be logged in to vote
0 replies
Comment options

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?

You must be logged in to vote
0 replies
Comment options

@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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
4 participants
Converted from issue

This discussion was converted from issue #603 on January 26, 2024 16:19.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.