| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Output\Hook; |
| 4 | |
| 5 | use MediaWiki\Output\OutputPage; |
| 6 | use Skin; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "BeforePageDisplay" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | */ |
| 15 | interface BeforePageDisplayHook { |
| 16 | /** |
| 17 | * This hook is called prior to outputting a page. |
| 18 | * |
| 19 | * @since 1.35 |
| 20 | * |
| 21 | * @param OutputPage $out |
| 22 | * @param Skin $skin |
| 23 | * @return void This hook must not abort, it must return no value |
| 24 | */ |
| 25 | public function onBeforePageDisplay( $out, $skin ): void; |
| 26 | } |
| 27 | |
| 28 | /** @deprecated class alias since 1.42 */ |
| 29 | class_alias( BeforePageDisplayHook::class, 'MediaWiki\Hook\BeforePageDisplayHook' ); |