class extension_guesser extends guesser_base

Properties

protected int $priority from  guesser_base
protected file $extension_map

Methods

int
get_priority()

Get the guesser priority

void
set_priority(int $priority)

Set the guesser priority

bool
is_supported()

Returns whether this guesser is supported on the current OS

string
guess(string $file, string $file_name = '')

Guess mimetype of supplied file

string|null
map_extension_to_type(string $file_name)

Map extension of supplied file_name to mime type

Details

in guesser_base at line 26
int get_priority()

Get the guesser priority

Return Value

int

Guesser priority

in guesser_base at line 34
void set_priority(int $priority)

Set the guesser priority

Parameters

int $priority

Guesser priority

Return Value

void

at line 474
bool is_supported()

Returns whether this guesser is supported on the current OS

Return Value

bool

True if guesser is supported, false if not

at line 482
string guess(string $file, string $file_name = '')

Guess mimetype of supplied file

Parameters

string $file

Path to file

string $file_name

The real file name

Return Value

string

Guess for mimetype of file

at line 495
protected string|null map_extension_to_type(string $file_name)

Map extension of supplied file_name to mime type

Parameters

string $file_name

Path to file or filename

Return Value

string|null

Mimetype if known or null if not