Interface Ui5RegistryInterface
Build-time registry and introspection contract for the LaravelUi5 Core.
The Ui5Registry is the authoritative source of truth for all UI5-related
artifacts declared in a Laravel application. It is responsible for
discovering, instantiating, and indexing UI5 modules and artifacts
based on configuration and PHP attributes.
The registry operates exclusively at build time (or during application
bootstrapping) and is intentionally reflection-heavy. Its primary purpose
is to provide normalized, deterministic metadata for:
- runtime cache generation
- manifest and resource root assembly
- documentation and inspection tooling
The registry does NOT:
- perform authorization
- interpret semantic meaning
- resolve user intents
- make runtime decisions
In Core 2.0, the registry is strictly technical and URI-oriented.
Semantic concerns (navigation meaning, intent declaration, authorization)
are explicitly handled by the SDK layer.
Responsibilities:
- Discover UI5 modules from configuration
- Discover UI5 artifacts via module registration
- Guarantee uniqueness of module slugs and artifact namespaces
- Provide deterministic lookup structures for cache generation
System guarantees:
- Each module has exactly one unique slug
- Each artifact has a globally unique namespace
- Artifact type (app, lib, action, report, …) is stable and deterministic
Typical consumers:
- ui5:cache command
- build-time manifest generators
- tooling and diagnostics
| Methods |
public
|
modules(): array<string, Ui5ModuleInterface>
Returns all registered modules.
Returns all registered modules.
Implemented by
|
#
|
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
|
artifacts(): array<string, Ui5ArtifactInterface>
Returns all registered artifacts across all modules.
Returns all registered artifacts across all modules.
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
|
settings(string|null $namespace = null): array
Returns all settings declared via #[Setting] attributes,
grouped by artifact namespace.
Returns all settings declared via #[Setting] attributes,
grouped by artifact namespace.
- When
$namespace is provided, only settings belonging to
that namespace are returned.
- When
$namespace is null, all settings across all registered
artifacts are returned.
The result reflects the normalized internal structure:
$settings[$namespace][$settingName] = Setting.
Example:
$registry->settings('io.pragmatiqu.dashboard');
// → [ 'refreshInterval' => Setting, 'theme' => Setting, ... ]
Parameters
| $namespace |
Optional artifact namespace to filter by.
|
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
|
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
|
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
|
#
|