MimeType
Maps file extensions to MIME types. Adapted from thephpleague/flysystem.
Tags
Table of Contents
detectByFileExtension() | Detects MIME Type based on file extension. | string|null |
---|---|---|
detectByFilename() | string | |
getExtensionToMimeTypeMap() | array |
Methods
detectByFileExtension()
Detects MIME Type based on file extension.
public
static detectByFileExtension(
$extension :
string
)
: string|null
Parameters
- $extension : string
Return values
string|null —MIME Type or NULL if no extension detected
detectByFilename()
public
static detectByFilename(
$filename :
string
)
: string
Parameters
- $filename : string
Return values
stringgetExtensionToMimeTypeMap()
public
static getExtensionToMimeTypeMap(
)
: array
Return values
array —Map of file extension to MIME Type