| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Output\Hook; |
| 4 | |
| 5 | use MediaWiki\Output\OutputPage; |
| 6 | |
| 7 | /** |
| 8 | * This is a hook handler interface, see docs/Hooks.md. |
| 9 | * Use the hook name "OutputPageBeforeHTML" to register handlers implementing this interface. |
| 10 | * |
| 11 | * @stable to implement |
| 12 | * @ingroup Hooks |
| 13 | */ |
| 14 | interface OutputPageBeforeHTMLHook { |
| 15 | /** |
| 16 | * This hook is called when a page has been processed by the parser and the |
| 17 | * resulting HTML is about to be displayed. |
| 18 | * |
| 19 | * @since 1.35 |
| 20 | * |
| 21 | * @param OutputPage $out OutputPage object that corresponds to the page |
| 22 | * @param string &$text Text that will be displayed, in HTML |
| 23 | * @return bool|void This hook must not abort, it must return true or null. |
| 24 | */ |
| 25 | public function onOutputPageBeforeHTML( $out, &$text ); |
| 26 | } |
| 27 | |
| 28 | /** @deprecated class alias since 1.42 */ |
| 29 | class_alias( OutputPageBeforeHTMLHook::class, 'MediaWiki\Hook\OutputPageBeforeHTMLHook' ); |