PlatformMapperInterface.php
23 lines
| 1 | <?php |
| 2 | |
| 3 | declare( strict_types=1 ); |
| 4 | |
| 5 | namespace Automattic\WooCommerce\Internal\CLI\Migrator\Interfaces; |
| 6 | |
| 7 | /** |
| 8 | * Defines the contract for classes responsible for transforming |
| 9 | * raw platform data into a standardized format suitable for the WooCommerce Importer. |
| 10 | */ |
| 11 | interface PlatformMapperInterface { |
| 12 | |
| 13 | /** |
| 14 | * Maps raw platform product data to a standardized array format. |
| 15 | * |
| 16 | * @param object $platform_data The raw product data object from the source platform (e.g., Shopify product node). |
| 17 | * |
| 18 | * @return array A standardized array representing the product, understandable by the WooCommerce_Product_Importer. |
| 19 | * The specific structure of this array needs to be defined and adhered to. |
| 20 | */ |
| 21 | public function map_product_data( object $platform_data ): array; |
| 22 | } |
| 23 |