ldc-ovoteam/app/Contracts/Executor.php
Jérémy Munsch 57faeada75
feat(dto): add CategoryProductsDto, ProductDto, and ProductSummaryDto
Add new DTOs for handling product and category data structures.
These DTOs facilitate data transfer and serialization for products and categories.

refactor(controller): update ProductController to use executor pattern

Refactor ProductController to utilize an executor for handling product creation,
updating, and deletion, improving code organization and maintainability.

refactor(controller): update RecipeController to use executor pattern

Refactor RecipeController to utilize an executor for handling recipe creation,
improving code organization and maintainability.

chore: remove MediaController

Remove MediaController as it is no longer needed in the application.

feat(request): enhance StoreProductRequest and UpdateProductRequest

Enhance StoreProductRequest and UpdateProductRequest to include methods for
transforming request data into input objects for actions.

chore: add ActionExecutorService for executing actions and queries

Introduce ActionExecutorService to handle the execution of actions and queries
with logging and transaction management.

chore(deps): update composer dependencies

Update composer dependencies to include webmozart/assert for improved type assertions.
2026-11-05 11:37:20 +01:00

19 lines
530 B
PHP

<?php
declare(strict_types=1);
namespace App\Contracts;
interface Executor
{
/**
* @template TInputAction of \App\Contracts\ActionInput
* @template TInputQuery of \App\Contracts\QueryInput
* @template TResult
*
* @param \App\Contracts\Query<TInputQuery,TResult>|\App\Contracts\Action<TInputAction,TResult> $executable
* @param TInputAction|TInputQuery $input
* @return TResult
*/
public function execute(Action | Query $executable, ActionInput | QueryInput $input): mixed;
}