You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
395 B
20 lines
395 B
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use App\Services\Chunkers\JsonChunker;
|
|
use App\Services\Converters\JsonToDatabaseConverter;
|
|
|
|
enum FileFormatEnum: string
|
|
{
|
|
case JSON = 'json';
|
|
|
|
public function chunker(string $uuid, string $path): \Generator
|
|
{
|
|
$chunker = match ($this) {
|
|
self::JSON => new JsonChunker
|
|
};
|
|
|
|
return $chunker->handle($uuid, $path);
|
|
}
|
|
}
|
|
|