Makes possible to guess the MIME type of a file using its extension.
Name | Modifiers | Type | Description |
---|---|---|---|
ExtensionMimeTypeGuesser::$defaultMapping | protected | property | Default MIME extension mapping. |
ExtensionMimeTypeGuesser::$mapping | protected | property | The MIME types mapping array after going through the module handler. |
ExtensionMimeTypeGuesser::$moduleHandler | protected | property | The module handler. |
ExtensionMimeTypeGuesser::guess | public | function | Guesses the mime type of the file with the given path. Overrides MimeTypeGuesserInterface::guess |
ExtensionMimeTypeGuesser::setMapping | public | function | Sets the mimetypes/extension mapping to use when guessing mimetype. |
ExtensionMimeTypeGuesser::__construct | public | function | Constructs a new ExtensionMimeTypeGuesser. |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!File!MimeType!ExtensionMimeTypeGuesser.php/class/ExtensionMimeTypeGuesser/8.1.x