interface MimeTypesInterface implements MimeTypeGuesserInterface

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.

array
getMimeTypes(string $ext)

Gets the MIME types for the given extension.

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 The path to the file

Return Value

string|null The MIME type or null, if none could be guessed

Exceptions

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

at line 26
array getExtensions(string $mimeType)

Gets the extensions for the given MIME type.

Parameters

string $mimeType

Return Value

array an array of extensions (first one is the preferred one)

at line 33
array getMimeTypes(string $ext)

Gets the MIME types for the given extension.

Parameters

string $ext

Return Value

array an array of MIME types (first one is the preferred one)