\Symfony\Component\HttpFoundation\File\MimeTypeFileinfoMimeTypeGuesser

Guesses the mime type using the PECL extension FileInfo.

Summary

Methods
Properties
Constants
__construct()
isSupported()
guess()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$magicFile
N/A

Properties

$magicFile

$magicFile : 

Type

Methods

__construct()

__construct(string  $magicFile = null) 

Parameters

string $magicFile

A magic file to use with the finfo instance

isSupported()

isSupported() : boolean

Returns whether this guesser is supported on the current OS/PHP setup.

Returns

boolean

guess()

guess(string  $path) : string

Guesses the mime type of the file with the given path.

Parameters

string $path

The path to the file

Returns

string —

The mime type or NULL, if none could be guessed