ameliabooking
/
src
/
Application
/
Controller
/
Bookable
/
Service
/
GetServiceDeleteEffectController.php
AddServiceController.php
1 month ago
DeleteServiceController.php
1 month ago
GetServiceController.php
1 month ago
GetServiceDeleteEffectController.php
1 month ago
GetServicesController.php
1 month ago
UpdateServiceController.php
1 month ago
UpdateServiceStatusController.php
1 month ago
UpdateServicesPositionsController.php
1 month ago
GetServiceDeleteEffectController.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AmeliaBooking\Application\Controller\Bookable\Service; |
| 4 | |
| 5 | use AmeliaBooking\Application\Commands\Bookable\Service\GetServiceDeleteEffectCommand; |
| 6 | use AmeliaBooking\Application\Controller\Controller; |
| 7 | use AmeliaVendor\Psr\Http\Message\ServerRequestInterface as Request; |
| 8 | |
| 9 | /** |
| 10 | * Class GetServiceDeleteEffectController |
| 11 | * |
| 12 | * @package AmeliaBooking\Application\Controller\Bookable\Service |
| 13 | */ |
| 14 | class GetServiceDeleteEffectController extends Controller |
| 15 | { |
| 16 | /** |
| 17 | * Instantiates the Get Service Delete Effect command to hand it over to the Command Handler |
| 18 | * |
| 19 | * @param Request $request |
| 20 | * @param $args |
| 21 | * |
| 22 | * @return GetServiceDeleteEffectCommand |
| 23 | * @throws \RuntimeException |
| 24 | */ |
| 25 | protected function instantiateCommand(Request $request, $args) |
| 26 | { |
| 27 | $command = new GetServiceDeleteEffectCommand($args); |
| 28 | $requestBody = $request->getParsedBody(); |
| 29 | $this->setCommandFields($command, $requestBody); |
| 30 | |
| 31 | return $command; |
| 32 | } |
| 33 | } |
| 34 |