ParsoidParser: Record ParserOptions watcher on ParserOutput object
[mediawiki.git] / includes / Hook / MimeMagicInitHook.php
blob594ad96f961c65094fd8cd9250e64389f33c73e5
1 <?php
3 namespace MediaWiki\Hook;
5 use MimeAnalyzer;
7 /**
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "MimeMagicInit" to register handlers implementing this interface.
11 * @stable to implement
12 * @ingroup Hooks
14 interface MimeMagicInitHook {
15 /**
16 * This hook is called before processing the list mapping MIME types to media types
17 * and the list mapping MIME types to file extensions.
18 * As an extension author, you are encouraged to submit patches to MediaWiki's
19 * core to add new MIME types to mime.types.
21 * @since 1.35
23 * @param MimeAnalyzer $mimeMagic
24 * - Use $mimeMagic->addExtraInfo( $stringOfInfo ); for adding new MIME info to the list.
25 * - Use $mimeMagic->addExtraTypes( $stringOfTypes ); for adding new MIME types to the list.
26 * @return bool|void True or no return value to continue or false to abort
28 public function onMimeMagicInit( $mimeMagic );