public static function guessMimeTypeFromFilename(string $file, string $default = self::MIMETYPE_DEFAULT): string
    {
        $file = \strtolower($file);
        
        if (($pos = \strrpos($file, '.')) !== false) {
            $file = \substr($file, $pos + 1);
        }
        
        if (\array_key_exists($file, self::$mimeTypes)) {
            return self::$mimeTypes[$file];
        }
        
        return $default;
    }
public static function guessMimeTypeFromFilename(string $file, string $default = self::MIMETYPE_DEFAULT): string
    {
        $file = \strtolower($file);
        
        if (($pos = \strrpos($file, '.')) !== false) {
            $file = \substr($file, $pos + 1);
        }
        
        if (\array_key_exists($file, self::$mimeTypes)) {
            return self::$mimeTypes[$file];
        }
        
        return $default;
    }
public static function guessMimeTypeFromFilename ( string $ file , string $ default = self :: MIMETYPE_DEFAULT ) : string { $ file = \ strtolower ( $ file ) ; if ( ( $ pos = \ strrpos ( $ file , '.' ) ) !== false ) { $ file = \ substr ( $ file , $ pos + 1 ) ; } if ( \ array_key_exists ( $ file , self :: $ mimeTypes ) ) { return self :: $ mimeTypes [ $ file ] ; } return $ default ; }
Get the guessed MIME type of a file.
Get the guessed MIME type of a file .