MediaWiki REL1_31
MimeMagic.php
Go to the documentation of this file.
1<?php
21use Wikimedia\Assert\Assert;
22
27class 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( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
MediaWikiServices is the service locator for the application scope of MediaWiki.
static singleton()
Get an instance of this class.
Definition MimeMagic.php:33