MimeTypeGuesser::guess()

string guess(string $path)

Tries to guess the mime type of the given file.

The file is passed to each registered mime type guesser in reverse order of their registration (last registered is queried first). Once a guesser returns a value that is not NULL, this method terminates and returns the value.

Parameters

string $path The path to the file

Return Value

string The mime type or NULL, if none could be guessed

Exceptions

LogicException
FileNotFoundException
AccessDeniedException
doc_Symfony
2016-10-28 06:23:48
Comments
Leave a Comment

Please login to continue.