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