1: <?php
2:
3: namespace LaravelUi5\Core\Contracts;
4:
5:
6: /**
7: * Contract for classes that accept declarative, resolved request parameters.
8: *
9: * Implementations must support an immutable "wither" to inject a typed
10: * argument bag (Ui5Args) and expose a read accessor for usage in domain code.
11: *
12: * Rules:
13: * - withArgs(Ui5Args) MUST NOT mutate the instance; return a cloned instance.
14: * - args() MUST always return a Ui5Args (empty bag if nothing was injected).
15: *
16: * Typical implementers:
17: * - Report data providers
18: * - Resource data providers
19: * - Action handlers
20: */
21: interface ParameterizableInterface
22: {
23: /**
24: * Immutable injection of resolved parameters.
25: *
26: * @return static cloned instance carrying the provided arguments
27: */
28: public function withArgs(Ui5Args $args): static;
29:
30: /**
31: * Accessor for the resolved arguments.
32: * Should return an empty Ui5Args when no arguments were injected.
33: */
34: public function args(): Ui5Args;
35: }
36: