| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Diff\Hook; |
| 4 | |
| 5 | use DifferenceEngine; |
| 6 | use MediaWiki\Output\OutputPage; |
| 7 | use MediaWiki\Parser\ParserOutput; |
| 8 | use WikiPage; |
| 9 | |
| 10 | /** |
| 11 | * This is a hook handler interface, see docs/Hooks.md. |
| 12 | * Use the hook name "DifferenceEngineRenderRevisionAddParserOutput" to register handlers implementing this interface. |
| 13 | * |
| 14 | * @stable to implement |
| 15 | * @ingroup Hooks |
| 16 | */ |
| 17 | interface DifferenceEngineRenderRevisionAddParserOutputHook { |
| 18 | /** |
| 19 | * Use this hook to change the parser output. |
| 20 | * |
| 21 | * @since 1.35 |
| 22 | * |
| 23 | * @param DifferenceEngine $differenceEngine |
| 24 | * @param OutputPage $out |
| 25 | * @param ParserOutput $parserOutput |
| 26 | * @param WikiPage $wikiPage |
| 27 | * @return bool|void True or no return value to continue, or false to not add parser output via |
| 28 | * OutputPage's addParserOutput method |
| 29 | */ |
| 30 | public function onDifferenceEngineRenderRevisionAddParserOutput( |
| 31 | $differenceEngine, $out, $parserOutput, $wikiPage |
| 32 | ); |
| 33 | } |