class MimeType

Methods

static MimeTypes
getMimeTypes()

Get the MIME types instance.

static string
from(string $filename)

Get the MIME type for a file based on the file's extension.

static string
get(string $extension)

Get the MIME type for a given extension or return all MIME types.

static string|null
search(string $mimeType)

Search for the extension of a given MIME type.

Details

at line 19
static MimeTypes getMimeTypes()

Get the MIME types instance.

Return Value

MimeTypes

at line 31
static string from(string $filename)

Get the MIME type for a file based on the file's extension.

Parameters

string $filename

Return Value

string

at line 41
static string get(string $extension)

Get the MIME type for a given extension or return all MIME types.

Parameters

string $extension

Return Value

string

Search for the extension of a given MIME type.

Parameters

string $mimeType

Return Value

string|null