interface MimeTypesInterface implementsMimeTypeGuesserInterface

Methods

bool
isGuesserSupported()

Returns true if this guesser is supported.

string|null
guessMimeType(string$path)

Guesses the MIME type of the file with the given path.

array
getExtensions(string$mimeType)

Gets the extensions for the given MIME type in decreasing order of preference.

array
getMimeTypes(string$ext)

Gets the MIME types for the given extension in decreasing order of preference.

Details

bool isGuesserSupported()

Returns true if this guesser is supported.

Return Value

bool

string|null guessMimeType(string$path)

Guesses the MIME type of the file with the given path.

Parameters

string $path

Return Value

string|null

Exceptions

LogicException If the guesser is not supported
InvalidArgumentException If the file does not exist or is not readable

array getExtensions(string$mimeType)

Gets the extensions for the given MIME type in decreasing order of preference.

Parameters

string $mimeType

Return Value

array

array getMimeTypes(string$ext)

Gets the MIME types for the given extension in decreasing order of preference.

Parameters

string $ext

Return Value

array