1: <?php
2:
3: namespace LaravelUi5\Core\Ui5\Capabilities;
4:
5: use LaravelUi5\Core\Attributes\Parameter;
6:
7: /**
8: * Contract for UI5 Action Handlers.
9: *
10: * An ActionHandler encapsulates the runtime logic for a UI5 Action.
11: * ActionHandlers are explicitly designed to perform
12: * *state-changing operations* such as
13: * - updating or deleting records
14: * - triggering workflows or notifications
15: * - executing domain-specific commands
16: *
17: * Responsibilities:
18: * - Implement a single `handle()` method containing the action logic.
19: * - Always return an **array** describing the outcome (machine- and
20: * human-readable), e.g.:
21: * ```php
22: * ['status' => 'success', 'message' => 'Mailbox cleared']
23: * ```
24: *
25: * Notes:
26: * - Input expectations are declared via {@see Parameter}s,
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
33: {
34: }
35: