MediaWiki
REL1_30
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
// XXX: We know that the MimeAnalyzer is currently an instance of MimeMagic
35
$instance = MediaWikiServices::getInstance()->getMimeAnalyzer();
36
Assert::postcondition(
37
$instance instanceof
MimeMagic
,
38
__METHOD__ .
' should return an instance of '
. self::class
39
);
40
return
$instance;
41
}
42
}
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition
MediaWikiServices.php:78
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:42:37 for MediaWiki by
1.10.0