QuickTime::class, 'video/x-msvideo' => MSVideo::class, ]; /** * Returns new event instance * * @param string $file * @return Base */ public static function create(string $file): Base { $type = mime_content_type($file); $class = Arr::get(self::map,$type,Unknown::class); return new $class($file,$type); } }