Public service related to MIME type detection.
More...
Public service related to MIME type detection.
- Since
- 3.3
Definition at line 13 of file MimeTypeService.php.
Get the mimetype for a given filename.
- Parameters
-
string | $filename | Filename to check |
string | $default | Default mimetype if not detected (default: application/octet-stream) |
- Exceptions
-
- Returns
- string
Definition at line 35 of file MimeTypeService.php.
Elgg\Filesystem\MimeTypeService::getSimpleType |
( |
string |
$mimetype, |
|
|
string |
$default = 'general' |
|
) |
| |
Returns the category of a file from its MIME type.
- Parameters
-
string | $mimetype | The MIME type |
string | $default | Default MIME type if detection fails (default: general) |
- Returns
- string
Definition at line 61 of file MimeTypeService.php.
Elgg\Filesystem\MimeTypeService::getSimpleTypeFromFile |
( |
string |
$filename, |
|
|
string |
$default = 'general' |
|
) |
| |
Returns the category of a file from a filename.
- Parameters
-
string | $filename | The filename to check |
string | $default | Default MIME type if detection fails (default: general) |
- Returns
- string
Definition at line 98 of file MimeTypeService.php.
Elgg\Filesystem\MimeTypeService::$hooks |
|
protected |
The documentation for this class was generated from the following file: