FileAccess Orion

FileinfoMimeTypeGuesser
in package
implements MimeTypeGuesserInterface

Guesses the mime type using the PECL extension FileInfo.

Tags
author

Bernhard Schussek bschussek@gmail.com

deprecated

since Symfony 4.3, use instead

Interfaces, Classes, Traits and Enums

MimeTypeGuesserInterface
Guesses the mime type of a file.

Table of Contents

$magicFile  : mixed
__construct()  : mixed
guess()  : string|null
Guesses the mime type of the file with the given path.
isSupported()  : bool
Returns whether this guesser is supported on the current OS/PHP setup.

Properties

Methods

guess()

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

public guess(mixed $path) : string|null
Parameters
$path : mixed

The path to the file

Return values
string|null

The mime type or NULL, if none could be guessed

isSupported()

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

public static isSupported() : bool
Return values
bool

Search results