MimeTypesInterface
extends
MimeTypeGuesserInterface
in
Guesses the MIME type of a file.
Tags
Table of Contents
Methods
- getExtensions() : array<string|int, string>
- Gets the extensions for the given MIME type in decreasing order of preference.
- getMimeTypes() : array<string|int, string>
- Gets the MIME types for the given extension in decreasing order of preference.
- guessMimeType() : string|null
- Guesses the MIME type of the file with the given path.
- isGuesserSupported() : bool
- Returns true if this guesser is supported.
Methods
getExtensions()
Gets the extensions for the given MIME type in decreasing order of preference.
public
getExtensions(string $mimeType) : array<string|int, string>
Parameters
- $mimeType : string
Return values
array<string|int, string>getMimeTypes()
Gets the MIME types for the given extension in decreasing order of preference.
public
getMimeTypes(string $ext) : array<string|int, string>
Parameters
- $ext : string
Return values
array<string|int, string>guessMimeType()
Guesses the MIME type of the file with the given path.
public
guessMimeType(string $path) : string|null
Parameters
- $path : string
Tags
Return values
string|nullisGuesserSupported()
Returns true if this guesser is supported.
public
isGuesserSupported() : bool