I'm writing a service in PHP. Others will access this service with HTTP GETs and POSTs and it will just return plain json. It's simple and suits the needs.
However, I would like the phpdoc I write in the PHP to show up if they visit it via their browser (i.e. without the $_GET
variables I use to generate the result). Is there something that just parses every comment in a phpdoc-ish way and shows the results?
Edit: of course I realize I could just echo some static text, but I'm specifically looking for something that dynamically generates that, so it's not possible for me to forget to update the text with new calls or changed parameters.
Two options that come to mind: a cron job or on-demand PHPDoc. Then have your site issue a redirect to the documentation when visited without any parameters.