1: <?php
2:
3: namespace LaravelUi5\Core\Contracts;
4:
5: use LaravelUi5\Core\Attributes\Parameter;
6:
7: /**
8: * Contract for validating input parameters for UI5 artifacts.
9: *
10: * This interface defines a service responsible for validating and normalizing
11: * the input parameters passed to a report (e.g., from the selection screen or a URL).
12: *
13: * Implementations must:
14: * - enforce declared Parameter attributes
15: * - normalize missing or default values
16: * - throw validation exceptions on error
17: *
18: * @see Parameter
19: * @see ParameterizableInterface
20: */
21: interface ParameterResolverInterface
22: {
23: /**
24: * Validates and normalizes the report parameters.
25: *
26: * This method ensures that all parameters passed to the report
27: * match the declared rules in the report's parameter definition.
28: *
29: * @param ParameterizableInterface $target The report’s data provider implementation
30: */
31: public function resolve(ParameterizableInterface $target): Ui5Args;
32: }
33: