1: <?php
2:
3: namespace LaravelUi5\Core\Ui5\Contracts;
4:
5: /**
6: * Marker interface for UI5 artefacts that expose static assets.
7: *
8: * This allows Laravel controllers to retrieve the appropriate file path for resources
9: * like preload scripts, i18n bundles, and maps, based on a given relative filename.
10: */
11: interface HasAssetsInterface
12: {
13: /**
14: * Resolve the absolute path to an exposed asset (e.g., Component-preload.js).
15: *
16: * If the file exists, return the full path. Otherwise, return null.
17: *
18: * @param string $filename The relative asset filename requested
19: * @return string|null The full filesystem path if it exists, or null otherwise
20: */
21: public function getAssetPath(string $filename): ?string;
22: }
23: