| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | /** |
| 6 | * This is a hook handler interface, see docs/Hooks.md. |
| 7 | * Use the hook name "ParserLimitReportFormat" to register handlers implementing this interface. |
| 8 | * |
| 9 | * @stable to implement |
| 10 | * @ingroup Hooks |
| 11 | */ |
| 12 | interface ParserLimitReportFormatHook { |
| 13 | /** |
| 14 | * This hook is called for each row in the parser limit report that |
| 15 | * needs formatting. If nothing handles this hook, the default is to use "$key" to |
| 16 | * get the label, and "$key-value" or "$key-value-text"/"$key-value-html" to |
| 17 | * format the value. |
| 18 | * |
| 19 | * @since 1.35 |
| 20 | * |
| 21 | * @param string $key Key for the limit report item |
| 22 | * @param string &$value Value of the limit report item |
| 23 | * @param string &$report String onto which to append the data |
| 24 | * @param bool $isHTML If true, $report is an HTML table with two columns; if false, it's |
| 25 | * text intended for display in a monospaced font |
| 26 | * @param bool $localize If false, $report should be output in English |
| 27 | * @return bool|void True or no return value to continue or false to abort |
| 28 | */ |
| 29 | public function onParserLimitReportFormat( $key, &$value, &$report, $isHTML, |
| 30 | $localize |
| 31 | ); |
| 32 | } |