Свойство | Тип | Описание | |
---|---|---|---|
$extensions | array | ||
$strategies | callable[] | ||
$use_extension | boolean |
Метод | Описание | |
---|---|---|
fixDetectionErrors ( string $type, string $extension ) : string | Fix common type detection errors | |
getType ( string $file, string $default = self::DEFAULT_TYPE ) : string | Sniff the MIME type | |
tryFile ( string $file ) : string | Detect MIME type using file(1) | |
tryFinfo ( string $file ) : string | Detect MIME type using finfo_open | |
tryGetimagesize ( string $file ) : string | Detect MIME type | |
tryMimeContentType ( string $file ) : string | Detect MIME type using mime_content_type | |
tryStrategies ( string $file ) : string | Detect MIME type using various strategies |
public static tryGetimagesize ( string $file ) : string | ||
$file | string | File path |
Результат | string | Type detected. Empty string on failure |
public static tryMimeContentType ( string $file ) : string | ||
$file | string | File path |
Результат | string | Type detected. Empty string on failure |
public tryStrategies ( string $file ) : string | ||
$file | string | File path |
Результат | string | Type detected. Empty string on failure |