1: <?php
2:
3: namespace LaravelUi5\Core\Ui5\Contracts;
4:
5: /**
6: * Contract for UI5 Action Handlers.
7: *
8: * An ActionHandler encapsulates the runtime logic for a UI5 Action.
9: * Unlike {@see DataProviderInterface} implementations, ActionHandlers
10: * are explicitly designed to perform *state-changing operations* such as
11: * - updating or deleting records
12: * - triggering workflows or notifications
13: * - executing domain-specific commands
14: *
15: * Responsibilities:
16: * - Implement a single `execute()` method containing the action logic.
17: * - Always return an **array** describing the outcome (machine- and
18: * human-readable), e.g.:
19: * ```php
20: * ['status' => 'success', 'message' => 'Mailbox cleared']
21: * ```
22: * - May implement {@see ConfigurableInterface} to consume settings or
23: * feature flags that influence runtime behavior.
24: *
25: * Notes:
26: * - Input expectations are declared via {@see ParameterizableInterface},
27: * - ActionHandlers must always return a structured result, even if
28: * no payload is strictly required (e.g., a simple status + message).
29: * - Dependencies (repositories, services) should be injected via
30: * constructor dependency injection for testability and clarity.
31: */
32: interface ActionHandlerInterface extends ExecutableInterface, ParameterizableInterface
33: {
34: }
35: