Phpdocumentor: JSON representation of intermediate data?

Created on 10 May 2020  路  4Comments  路  Source: phpDocumentor/phpDocumentor

Feature request (or help finding existing feature)

Is there a way I can get a JSON dump of the raw intermediate data (later used to generate the HTML views)? Is this possible, or is it something we can add?

My use case: I need to do a whole lot of filtering, sorting and tweaking before presenting docs in a custom made GUI. I tried running the vendor/bin/phpdoc.php with a few flags which generates the output dir, but saw mostly HTML/JS/CSS, no easily parsable data dump file.

While here, thanks for making this awesome tool :rocket:

question

All 4 comments

@ajthinking what you can do is use --template=xml as an option (or configure that in your configuration file). This will render an XML representation of the data collected by phpDocumentor.

I know it is not JSON; but due to the structure of the data, we felt it more appropriate to provide XML as a format. It also allows us to create an XSD file with more information about the elements, though that is still on the roadmap

XML is perfect! Thanks @mvriel :)

This should be mentioned in the tutorial on building template.

For phpDocumentor 3 we are rewriting most of the documentation; including that for making templates. I will keep it in mind to add it. In v3 we have a couple of new features for overriding parts of a template, so that you do not need to create a complete custom template if you only want one thing changed :)

Was this page helpful?
0 / 5 - 0 ratings