This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services\FileImport\Importer; | |
use App\Models\Dto\FileImportDto; | |
use App\Services\FileImport\Interface\FileImporterInterface; | |
class DeliveryJoblistFileImporter implements FileImporterInterface | |
{ | |
public function readData(FileImportDto $fileDto): array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services\FileImport\Importer; | |
use App\Models\Dto\FileImportDto; | |
use App\Services\FileImport\Interface\FileImporterInterface; | |
class OfficeWorkJoblistFileImporter implements FileImporterInterface | |
{ | |
public function readData(FileImportDto $fileDto): array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models\Dto; | |
use Illuminate\Http\UploadedFile; | |
class FileImportDto | |
{ | |
public UploadedFile $uploadedFile; | |
public int $fileType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services\FileImport; | |
use App\Services\FileImport\Interface\FileImporterInterface; | |
class ImporterFactory | |
{ | |
public function createImporter(): FileImporterInterface | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services\FileImport\Interface; | |
use App\Models\Dto\FileImportDto; | |
interface FileImporterInterface | |
{ | |
/** | |
* type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services\FileImport\Importer; | |
use App\Models\Dto\FileImportDto; | |
use App\Services\FileImport\Interface\FileImporterInterface; | |
class OfficeWorkJoblistFileImporter implements FileImporterInterface | |
{ | |
public static function type(): int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services\FileImport; | |
use App\Services\FileImport\Importer\DeliveryJoblistFileImporter; | |
use App\Services\FileImport\Importer\OfficeWorkJoblistFileImporter; | |
use App\Services\FileImport\Importer\RestaurantJoblistFileImporter; | |
use App\Services\FileImport\Interface\FileImporterInterface; | |
class ImporterFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services\FileImport; | |
use App\Models\Dto\FileImportDto; | |
use App\Services\FileImport\ImporterFactory; | |
use App\Services\FileImport\Interface\FileImporterInterface; | |
class JoblistFileImportContext | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services\FileImport; | |
use App\Models\Dto\FileImportDto; | |
class JoblistFileImportService | |
{ | |
/** | |
* processFile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Requests; | |
use App\Models\Dto\FileImportDto; | |
use Illuminate\Foundation\Http\FormRequest; | |
use Illuminate\Validation\Rule; | |
class FileImportRequest extends FormRequest | |
{ |