| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\Parser\Parser; |
| 6 | use MediaWiki\Parser\ParserOutput; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "ParserLimitReportPrepare" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | */ |
| 15 | interface ParserLimitReportPrepareHook { |
| 16 | /** |
| 17 | * This hook is called at the end of Parser:parse() when the parser |
| 18 | * will include comments about size of the text parsed. Hooks should use |
| 19 | * $output->setLimitReportData() to populate data. Functions for this hook should |
| 20 | * not use $wgLang; do that in ParserLimitReportFormat instead. |
| 21 | * |
| 22 | * @since 1.35 |
| 23 | * |
| 24 | * @param Parser $parser |
| 25 | * @param ParserOutput $output |
| 26 | * @return bool|void True or no return value to continue or false to abort |
| 27 | */ |
| 28 | public function onParserLimitReportPrepare( $parser, $output ); |
| 29 | } |