MediaWiki
REL1_31
MimeMagic.php
Go to the documentation of this file.
1
<?php
20
use
MediaWiki\MediaWikiServices
;
21
use Wikimedia\Assert\Assert;
22
27
class
MimeMagic
extends
MimeAnalyzer {
33
public
static
function
singleton
() {
34
wfDeprecated
( __METHOD__,
'1.28'
);
35
// XXX: We know that the MimeAnalyzer is currently an instance of MimeMagic
36
$instance = MediaWikiServices::getInstance()->getMimeAnalyzer();
37
Assert::postcondition(
38
$instance instanceof
MimeMagic
,
39
__METHOD__ .
' should return an instance of '
. self::class
40
);
41
return
$instance;
42
}
43
}
wfDeprecated
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
Definition
GlobalFunctions.php:1123
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition
MediaWikiServices.php:88
MimeMagic
Definition
MimeMagic.php:27
MimeMagic\singleton
static singleton()
Get an instance of this class.
Definition
MimeMagic.php:33
includes
MimeMagic.php
Generated on Mon Nov 25 2024 15:35:09 for MediaWiki by
1.10.0