wiki.techinc.nl/includes/Hook/MimeMagicGuessFromContentHook.php
James D. Forrester cc28acc455 Add namespace to remaining parts of Wikimedia\Mime and Wikimedia\Stats
Bug: T353458
Change-Id: If0137003ab625017d322d57870448a02569668c3
2024-09-27 16:19:10 -04:00

31 lines
881 B
PHP

<?php
namespace MediaWiki\Hook;
use Wikimedia\Mime\MimeAnalyzer;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "MimeMagicGuessFromContent" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface MimeMagicGuessFromContentHook {
/**
* Use this hook to guess the MIME by content.
*
* @since 1.35
*
* @param MimeAnalyzer $mimeMagic
* @param string &$head First 1024 bytes of the file in a string (in - Do not alter!)
* @param string &$tail More or equal than last 65558 bytes of the file in a string
* (in - Do not alter!)
* @param string $file File path
* @param string &$mime MIME type (out)
* @return bool|void True or no return value to continue or false to abort
*/
public function onMimeMagicGuessFromContent( $mimeMagic, &$head, &$tail, $file,
&$mime
);
}