1: <?php
2:
3: namespace LaravelUi5\Core\Ui5\Contracts;
4:
5: /**
6: * Contract for UI5 Card artifacts.
7: *
8: * A Card is a lightweight, embeddable UI element that typically displays
9: * summary or entry-point information (e.g. KPIs, recent items, small lists).
10: * It is backed by a {@see DataProviderInterface}, which encapsulates the
11: * domain logic and delivers the structured data required for rendering.
12: *
13: * Responsibilities:
14: * - Declares the association between the Card artifact and its provider.
15: * - Provides routing information via {@see SluggableInterface}.
16: * - Acts as a discoverable artifact within the {@see Ui5RegistryInterface}.
17: *
18: * Cross-cutting concerns:
19: * - If the provider implements {@see ParameterizableInterface}, validated
20: * request parameters are injected before execution.
21: * - If the provider implements {@see ConfigurableInterface}, resolved
22: * settings are injected before execution.
23: *
24: * Cards are read-only artifacts: they must not change application state.
25: */
26: interface Ui5CardInterface extends Ui5ArtifactInterface, SluggableInterface
27: {
28: /**
29: * Returns the class name or instance of the associated DataProvider.
30: *
31: * The provider is responsible for delivering the `card.content.data`
32: * structure as defined in the card manifest.
33: *
34: * @return DataProviderInterface
35: */
36: public function getProvider(): DataProviderInterface;
37: }
38: