| 1 |
<?php |
| 2 |
|
| 3 |
namespace AmeliaBooking\Application\Controller\Settings; |
| 4 |
|
| 5 |
use AmeliaBooking\Application\Commands\Settings\ProcessImportDataTransferCommand; |
| 6 |
use AmeliaBooking\Application\Controller\Controller; |
| 7 |
use AmeliaVendor\Psr\Http\Message\ServerRequestInterface as Request; |
| 8 |
|
| 9 |
class ProcessImportDataTransferController extends Controller |
| 10 |
{ |
| 11 |
public $allowedFields = [ |
| 12 |
'ameliaNonce', |
| 13 |
'wpAmeliaNonce', |
| 14 |
'jobId', |
| 15 |
]; |
| 16 |
|
| 17 |
protected function instantiateCommand(Request $request, $args) |
| 18 |
{ |
| 19 |
$command = new ProcessImportDataTransferCommand($args); |
| 20 |
$this->setCommandFields($command, $request->getParsedBody() ?: []); |
| 21 |
|
| 22 |
return $command; |
| 23 |
} |
| 24 |
} |
| 25 |
|