class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface
Guesses the mime type using the PECL extension FileInfo.
__construct(string $magicFile = null) | ||
static bool | isSupported() Returns whether this guesser is supported on the current OS/PHP setup. | |
string | guess(string $path) Guesses the mime type of the file with the given path. |
string | $magicFile | A magic file to use with the finfo instance |
http://www.php.net/manual/en/function.finfo-open.php |
Returns whether this guesser is supported on the current OS/PHP setup.
bool |
Guesses the mime type of the file with the given path.
string | $path | The path to the file |
string | The mime type or NULL, if none could be guessed |
FileNotFoundException | If the file does not exist |
AccessDeniedException | If the file could not be read |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.html