| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\Actions\ActionEntryPoint; |
| 6 | use MediaWiki\Output\OutputPage; |
| 7 | use MediaWiki\Request\WebRequest; |
| 8 | use MediaWiki\Title\Title; |
| 9 | use MediaWiki\User\User; |
| 10 | |
| 11 | /** |
| 12 | * This is a hook handler interface, see docs/Hooks.md. |
| 13 | * Use the hook name "BeforeInitialize" to register handlers implementing this interface. |
| 14 | * |
| 15 | * @stable to implement |
| 16 | * @ingroup Hooks |
| 17 | */ |
| 18 | interface BeforeInitializeHook { |
| 19 | /** |
| 20 | * This hook is called before anything is initialized in ActionEntryPoint::performRequest(). |
| 21 | * |
| 22 | * @since 1.35 |
| 23 | * |
| 24 | * @param Title $title Title being used for request |
| 25 | * @param null $unused |
| 26 | * @param OutputPage $output |
| 27 | * @param User $user |
| 28 | * @param WebRequest $request |
| 29 | * @param ActionEntryPoint $mediaWikiEntryPoint (changed from MediaWiki |
| 30 | * to MediaWikiEntryPoint in MW 1.42) |
| 31 | * @return bool|void True or no return value to continue or false to abort |
| 32 | */ |
| 33 | public function onBeforeInitialize( |
| 34 | $title, |
| 35 | $unused, |
| 36 | $output, |
| 37 | $user, |
| 38 | $request, |
| 39 | $mediaWikiEntryPoint |
| 40 | ); |
| 41 | } |