webmoney/backend/app/Services/Import/FileParserInterface.php

27 lines
629 B
PHP

<?php
namespace App\Services\Import;
interface FileParserInterface
{
/**
* Parse the file and return raw data
*/
public function parse(string $filePath, array $options = []): array;
/**
* Get headers from the file
*/
public function getHeaders(string $filePath, array $options = []): array;
/**
* Get preview data (first N rows)
*/
public function getPreview(string $filePath, int $rows = 10, array $options = []): array;
/**
* Check if the parser supports the given file type
*/
public static function supports(string $extension): bool;
}