MediaWiki REL1_37
MediaWiki\Hook\MimeMagicGuessFromContentHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Hook\MimeMagicGuessFromContentHook:

Public Member Functions

 onMimeMagicGuessFromContent ( $mimeMagic, &$head, &$tail, $file, &$mime)
 Use this hook to guess the MIME by content.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "MimeMagicGuessFromContent" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 14 of file MimeMagicGuessFromContentHook.php.

Member Function Documentation

◆ onMimeMagicGuessFromContent()

MediaWiki\Hook\MimeMagicGuessFromContentHook::onMimeMagicGuessFromContent (   $mimeMagic,
$head,
$tail,
  $file,
$mime 
)

Use this hook to guess the MIME by content.

Since
1.35
Parameters
MimeAnalyzer$mimeMagic
string&$headFirst 1024 bytes of the file in a string (in - Do not alter!)
string&$tailMore or equal than last 65558 bytes of the file in a string (in - Do not alter!)
string$fileFile path
string&$mimeMIME type (out)
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: