프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 |