| 1: | <?php |
| 2: | |
| 3: | namespace LaravelUi5\Core\Ui5\Contracts; |
| 4: | |
| 5: | /** |
| 6: | * Defines the contract for UI5 artifacts that can be resolved into renderable XML fragments. |
| 7: | * |
| 8: | * Implementations are expected to return a string of valid XML markup, |
| 9: | * typically representing a <GenericTile>, <Card>, or other UI5 component structures. |
| 10: | * |
| 11: | * This interface abstracts the rendering logic of a specific artifact and allows it |
| 12: | * to be consumed dynamically within a UI5 Fragment context (e.g., via Blade components or XML includes). |
| 13: | */ |
| 14: | interface ResolvableInterface |
| 15: | { |
| 16: | /** |
| 17: | * Resolves the UI5 artifact into a fully composed XML fragment string. |
| 18: | * |
| 19: | * The result must be a valid UI5 XML control definition, suitable for inclusion |
| 20: | * in a <core:FragmentDefinition> layout. Any dynamic content should already be |
| 21: | * injected at this point. |
| 22: | * |
| 23: | * @return string Rendered XML representation of the artifact. |
| 24: | */ |
| 25: | public function resolve(): string; |
| 26: | } |
| 27: |