\League\MimeTypeDetectionFinfoMimeTypeDetector

Summary

Methods
Properties
Constants
__construct()
detectMimeType()
detectMimeTypeFromPath()
detectMimeTypeFromFile()
detectMimeTypeFromBuffer()
No public properties found
INCONCLUSIVE_MIME_TYPES
No protected methods found
No protected properties found
N/A
takeSample()
$finfo
$extensionMap
$bufferSampleSize
N/A

Constants

INCONCLUSIVE_MIME_TYPES

INCONCLUSIVE_MIME_TYPES = ['application/x-empty', 'text/plain', 'text/x-asm']

Properties

$finfo

$finfo : \finfo

Type

\finfo —

$extensionMap

$extensionMap : \League\MimeTypeDetection\ExtensionToMimeTypeMap

Type

ExtensionToMimeTypeMap

$bufferSampleSize

$bufferSampleSize : int|null

Type

int|null

Methods

__construct()

__construct(string  $magicFile = '', \League\MimeTypeDetection\ExtensionToMimeTypeMap  $extensionMap = null, ?int  $bufferSampleSize = null) : mixed

Parameters

string $magicFile
\League\MimeTypeDetection\ExtensionToMimeTypeMap $extensionMap
?int $bufferSampleSize

Returns

mixed —

detectMimeType()

detectMimeType(string  $path, mixed  $contents) : ?string

Parameters

string $path
mixed $contents

Returns

?string —

detectMimeTypeFromPath()

detectMimeTypeFromPath(string  $path) : ?string

Parameters

string $path

Returns

?string —

detectMimeTypeFromFile()

detectMimeTypeFromFile(string  $path) : ?string

Parameters

string $path

Returns

?string —

detectMimeTypeFromBuffer()

detectMimeTypeFromBuffer(string  $contents) : ?string

Parameters

string $contents

Returns

?string —

takeSample()

takeSample(string  $contents) : string

Parameters

string $contents

Returns

string —