Interface Ui5RuntimeInterface
Defines the runtime lookup contract for the LaravelUi5 ecosystem.
This interface provides a minimal, read-only API to efficiently
resolve modules, artifacts, and semantic navigation data.
The runtime interface is designed for performance and determinism:
it supposes no reflection, scanning, or configuration merges.
Instead, it exposes lightweight lookups for runtime use cases such as
request routing, resource resolution, and intent navigation.
Example use cases:
- Resolve a module instance for an incoming route (e.g.
/ui5/app/users/...)
- Instantiate a UI5 artifact based on its namespace or slug
- Generate runtime resource roots for a set of modules
- Resolve cross-module navigation intents for deep links
| Methods |
public
|
hasModule(string $slug): bool
Checks whether a module with the given slug exists.
Checks whether a module with the given slug exists.
Parameters
| $slug |
The URL slug to identify the module (from config/ui5.php > modules)
|
Returns
True if module for slug is known
Implemented by
|
#
|
public
|
getModule(string $slug): Ui5ModuleInterface|null
Returns the module instance for the given slug, or null if not found.
Returns the module instance for the given slug, or null if not found.
Parameters
| $slug |
The URL slug to identify the module (from config/ui5.php > modules)
|
Returns
The instantiated module, or null if not found
Implemented by
|
#
|
public
|
has(string $namespace): bool
Checks whether an artifact with the given namespace is registered.
Checks whether an artifact with the given namespace is registered.
Parameters
| $namespace |
The fqn of the UI5 artifact
|
Returns
True if namespace for artifact is known
Implemented by
|
#
|
public
|
get(string $namespace): Ui5ArtifactInterface|null
Returns the artifact instance for the given namespace, or null if not found.
Returns the artifact instance for the given namespace, or null if not found.
Parameters
| $namespace |
The fqn of the UI5 artifact
|
Returns
The instantiated artifact, or null if not found
Implemented by
|
#
|
public
|
fromSlug(string $slug): Ui5ArtifactInterface|null
Returns the artifact instance for the given slug (as used in routing or URLs),
or null if not found.
Returns the artifact instance for the given slug (as used in routing or URLs),
or null if not found.
Parameters
| $slug |
The URL slug to identify the artifact
|
Returns
The instantiated artifact, or null if not found
Implemented by
|
#
|
public
|
slugFor(Ui5ArtifactInterface $artifact): string|null
Returns the canonical slug (e.g. "app/offers") for the given artifact.
Returns the canonical slug (e.g. "app/offers") for the given artifact.
Implemented by
|
#
|
public
|
resolve(string $namespace): string|null
Resolves a full public URL path for the given namespace
(e.g. "/ui5/app/offers/1.0.0").
Resolves a full public URL path for the given namespace
(e.g. "/ui5/app/offers/1.0.0").
Parameters
| $namespace |
The fqn of the UI5 artifact
|
Returns
The absolute path, or null if not found
Implemented by
|
#
|
public
|
resolveIntents(string $slug): array<string, array<string, array>>
Resolves all semantic navigation intents for the given module.
Resolves all semantic navigation intents for the given module.
Parameters
Implemented by
|
#
|
public
|
resolveRoots(array<int, string> $namespaces): array<string, string>
Resolves resource root URLs (namespace => URL) for multiple namespaces.
Resolves resource root URLs (namespace => URL) for multiple namespaces.
Parameters
| $namespaces |
The fqn of the UI5 artifact (app or lib!)
|
Implemented by
|
#
|