Re: Temporary hooks listing/documentation
Reply #22 –
Today I was in "coding fancy stuff" mood and wrote this:
https://gist.github.com/emanuele45/4924876bb2b4d32f1ed6f9d38989a27f
the idea is parse any file, find all the instances of call_integration_hook, grab any "doc block" before it and parse the resulting stuff the same way any normal DocBlock is parsed, for example:
/**
* This hook allows to alter the content of the arrays containing the data
* for each message.
*
* @param mixed[] $output Data ready to be sent to the template
* @param mixed[] $message Data coming from the database
*/
call_integration_hook('integrate_prepare_display_context', array(&$output, &$message));
at the moment, the code in the gist creates an array with all the elements, what is left is to actually create the documentation similarly to documentor (or whatever is currently used
).
What do you think?