I'm trying to figure out a good way to document controller actions in a php mvc framework. It's really important to me that there is a way to stick the url for the action in there, my problem is that I cant seem to find a way to fit that into the schema for phpdoc.
*/ These PHPDoc formatted comments are translated into HTML, creating documentation that explains what each class, function, or variable does without people having to read through the entire code.
When running phpDocumentor there are three command-line options that are essential: specifies the directory, or directories, of your project that you want to document. specifies a specific file, or files, in your project that you want to document. specifies the location where your documentation will be written (also called 'target folder').
After you have Installation phpDocumentor you can use the phpdoc command to generate your documentation. Throughout this documentation we expect that the phpdoc command is available; thus whenever we ask you to run a command, it will be in the following form
All you need to do is add a file called 'phpdoc.dist.xml' to the root of your project, add your options to it and then invoke the phpdoc command without arguments.
I don't really understand your problem/question. You can put whatever you want to in a phpdoc block, including the relevant URL for a controller action (you can even use markup if you want):
/**
* This is some foo action.
*
* URL: /foo/bar/baz
*/
public function fooAction(/* ... */) {
// ...
}
That said, if you specifically want to use a custom tag like @url
or something, then you just need to use the -ct
command-line option to tell phpdoc that you don't want it throwing parse errors when it comes across your custom tag(s):
# Will specify custom tag @url
phpdoc -ct url ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With