Refresh
This commit is contained in:
18
app/Contracts/ImportAdapter.php
Executable file
18
app/Contracts/ImportAdapter.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Contracts;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
* Interface for data importers.
|
||||
*/
|
||||
interface ImportAdapter
|
||||
{
|
||||
/**
|
||||
* Transforms data from specified request into an importable array. Data
|
||||
* collected from the request could be an uploaded file, credentials for
|
||||
* remote connection, anything the adapter could support.
|
||||
*/
|
||||
public function importFromRequest(Request $request): array;
|
||||
}
|
||||
Reference in New Issue
Block a user