MediaWiki  1.29.1
MimeMagic Class Reference
Inheritance diagram for MimeMagic:
Collaboration diagram for MimeMagic:

Static Public Member Functions

static singleton ()
 Get an instance of this class. More...
 

Additional Inherited Members

- Public Member Functions inherited from MimeAnalyzer
 __construct (array $params)
 
 addExtraInfo ( $info)
 Adds to the list mapping MIME to media type. More...
 
 addExtraTypes ( $types)
 Adds to the list mapping MIME to file extensions. More...
 
 detectZipType ( $header, $tail=null, $ext=false)
 Detect application-specific file type of a given ZIP file from its header data. More...
 
 findMediaType ( $extMime)
 Returns a media code matching the given MIME type or file extension. More...
 
 getExtensionsForType ( $mime)
 Returns a list of file extensions for a given MIME type as a space separated string or null if the MIME type was unrecognized. More...
 
 getIEMimeTypes ( $fileName, $chunk, $proposed)
 Get the MIME types that various versions of Internet Explorer would detect from a chunk of the content. More...
 
 getMediaType ( $path=null, $mime=null)
 Determine the media type code for a file, using its MIME type, name and possibly its contents. More...
 
 getTypesForExtension ( $ext)
 Returns a list of MIME types for a given file extension as a space separated string or null if the extension was unrecognized. More...
 
 guessMimeType ( $file, $ext=true)
 MIME type detection. More...
 
 guessTypesForExtension ( $ext)
 Returns a single MIME type for a given file extension or null if unknown. More...
 
 improveTypeFromExtension ( $mime, $ext)
 Improves a MIME type using the file extension. More...
 
 isMatchingExtension ( $extension, $mime)
 Tests if the extension matches the given MIME type. More...
 
 isPHPImageType ( $mime)
 Returns true if the MIME type is known to represent an image format supported by the PHP GD library. More...
 
 isRecognizableExtension ( $extension)
 Returns true if the extension represents a type which can be reliably detected from its content. More...
 
 setLogger (LoggerInterface $logger)
 
- Public Attributes inherited from MimeAnalyzer
array $mExtToMime = null
 Map of file extensions types to MIME types (as a space separated list) More...
 
- Protected Member Functions inherited from MimeAnalyzer
 getIEContentAnalyzer ()
 Get a cached instance of IEContentAnalyzer. More...
 
 loadFiles ()
 
- Protected Attributes inherited from MimeAnalyzer
callable $detectCallback
 
callable $extCallback
 
callable $guessCallback
 
IEContentAnalyzer $IEAnalyzer
 
string $infoFile
 
callable $initCallback
 
array $mediaTypes = null
 Mapping of media types to arrays of MIME types. More...
 
array $mimetoExt = null
 Map of MIME types to file extensions (as a space separated list) More...
 
array $mimeTypeAliases = null
 Map of MIME type aliases. More...
 
string $typeFile
 
string $xmlTypes
 
- Static Protected Attributes inherited from MimeAnalyzer
static $wellKnownInfo =
 Defines a set of well known MIME info entries This is used as a fallback to mime.info files. More...
 
static $wellKnownTypes =
 Defines a set of well known MIME types This is used as a fallback to mime.types files. More...
 

Detailed Description

Deprecated:
since 1.29 MimeAnalyzer should be used instead of MimeMagic

Definition at line 27 of file MimeMagic.php.

Member Function Documentation

◆ singleton()


The documentation for this class was generated from the following file: