MediaWiki REL1_30
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 // 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}
MediaWikiServices is the service locator for the application scope of MediaWiki.
static singleton()
Get an instance of this class.
Definition MimeMagic.php:33