Feature: Creating Skeleton for import command, interfaces, shopify importer

This commit is contained in:
2026-07-06 03:42:24 +03:00
parent 677b240a8d
commit cd9632a6bf
7 changed files with 147 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace Modules\Core\MigrateImport;
use Modules\Core\MigrateImport\Shopify\ShopifyExportImporter;
class ImporterFactory
{
public static function make(ImportSpec $spec): Importer
{
return match ([$spec->source, $spec->type]) {
["shopify", "export"] => new ShopifyExportImporter(),
// ["shopify", "api"] => new ShopifyApiImporter(),
// ["woocommerce", "export"] => new WooCommerceExportImporter(),
// ["woocommerce", "api"] => new WooCommerceApiImporter(),
default => throw new \InvalidArgumentException(
"No importer available for source \"{$spec->source}\" with type \"{$spec->type}\".",
),
};
}
}