1: <?php
2:
3: namespace LaravelUi5\Core\Ui5\Contracts;
4:
5: use LaravelUi5\Core\Ui5\Capabilities\DataProviderInterface;
6:
7: /**
8: * Contract for discoverable UI5 Resources.
9: *
10: * A Resource is a lightweight, read-only UI5 artifact that exposes
11: * structured data for consumption by the client (e.g. cards, dashboards, lists).
12: *
13: * Responsibilities:
14: * - Declares its identity (slug, urlKey) via Ui5ArtifactInterface + SluggableInterface.
15: * - Provides access to its runtime logic via a ResourceDataProvider.
16: *
17: * The actual execution logic lives in the ResourceDataProvider, keeping
18: * metadata and runtime separate.
19: */
20: interface Ui5ResourceInterface extends Ui5ArtifactInterface
21: {
22:
23: /**
24: * Returns the data provider that implements the runtime logic for this resource.
25: *
26: * @return DataProviderInterface
27: */
28: public function getProvider(): DataProviderInterface;
29: }
30: