| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\Context\IContextSource; |
| 6 | use Skin; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "RequestContextCreateSkin" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | */ |
| 15 | interface RequestContextCreateSkinHook { |
| 16 | /** |
| 17 | * This hook is called when RequestContext::getSkin creates a skin instance. |
| 18 | * Use this hook to override what skin is used in certain contexts. |
| 19 | * |
| 20 | * @since 1.35 |
| 21 | * |
| 22 | * @param IContextSource $context RequestContext the skin is being created for |
| 23 | * @param null|string|Skin &$skin A variable reference you may modify to set |
| 24 | * a Skin instance or string key on to override the skin that will be |
| 25 | * used for the context. |
| 26 | * @return bool|void True or no return value to continue or false to abort |
| 27 | */ |
| 28 | public function onRequestContextCreateSkin( $context, &$skin ); |
| 29 | } |