Currently code events only have a (moreless) freeform HTML description which usually contains information about the code event, the signature for the callback method and some description about the parameters.
However, the format of this HTML description is not standardized so 3rd party code events might not follow Xenforo "standard" here making it difficult for developers (and tools that need information about the signature and parameters).
My suggestion is to either
However, the format of this HTML description is not standardized so 3rd party code events might not follow Xenforo "standard" here making it difficult for developers (and tools that need information about the signature and parameters).
My suggestion is to either
- Standardize the structure of this HTML (and require this to be used by Resource Standards Rules) so all necesary information is always available (and can reliably be parsed)
- Introduce a new entity field to keep this information in an easy to parse format (PHPDoc?)
- Require a stub file for code events like
PHP:namespace XF; abstract class CodeEvents { /** * Called by the xf:db-repair command. * * Expects a \XF\Install\Data\AbstractMySQL object implementing getTables() and getData() * to be added to the incoming array, keyed by the addon_id, * to facilitate (re)creation of any missing database tables. * * @param array<string,\XF\Install\Data\AbstractMySQL> &$tableData Array containing \XF\Install\Data\AbstractMySQL objects keyed by addon_id * */ abstract public static function addonGetInstallData(array &$tableData): void; }
Upvote
0