public static function getTypeFromExtension(
        string $ext,
        string $default = "application/octet-stream"
    ): string
    {
        $ext = strtolower($ext);
        return self::$extensions[$ext] ?? $default;
    }
public static function getTypeFromExtension(
        string $ext,
        string $default = "application/octet-stream"
    ): string
    {
        $ext = strtolower($ext);
        return self::$extensions[$ext] ?? $default;
    }
public static function getTypeFromExtension ( string $ ext , string $ default = "application/octet-stream" ) : string { $ ext = strtolower ( $ ext ) ; return self :: $ extensions [ $ ext ] ?? $ default ; }
Get a content type from a file extension

@param string $ext A file extension without the dot
@param string $default A fallback type to return
@return string
Get a content type from a file extension