| 1: | <?php |
| 2: | |
| 3: | namespace LaravelUi5\Core\Ui5\Contracts; |
| 4: | |
| 5: | /** |
| 6: | * Contract for UI5 Data Providers. |
| 7: | * |
| 8: | * A DataProvider encapsulates read-only, idempotent logic for delivering |
| 9: | * structured data to UI5 artifacts such as Cards, Resources, or Reports. |
| 10: | * |
| 11: | * Responsibilities: |
| 12: | * - Assemble domain-specific data in a backend-driven way. |
| 13: | * - Return results in a structured array suitable for JSON serialization. |
| 14: | * - Optionally implement {@see ParameterizableInterface} to receive |
| 15: | * validated request parameters. |
| 16: | * - Optionally implement {@see ConfigurableInterface} to receive resolved |
| 17: | * tenant- or artifact-specific settings. |
| 18: | * |
| 19: | * Notes: |
| 20: | * - DataProviders must not perform state-changing operations. |
| 21: | * - Dependencies (services, repositories) should be injected via constructor DI. |
| 22: | * - The return array should be normalized (arrays, scalars, nested objects), |
| 23: | * not raw models or resources. |
| 24: | */ |
| 25: | interface DataProviderInterface extends ExecutableInterface |
| 26: | { |
| 27: | } |
| 28: |