Assembles fully wired DiscoveryService instances for specific runtime roles such as context initialization or global search.
An assembler is responsible for structural composition only. It builds the internal object graph of a DiscoveryService by instantiating and wiring the required CmdK collectors, each paired with its visibility constrainer, according to a declarative configuration.
The assembler does NOT:
Assembly answers the question: "Which discovery capabilities exist for this role?"
Runtime configuration (e.g. limits, filters, feature switches) is applied later in the request pipeline by the consumer of the assembled service.
Typical usage:
Example assembly configuration:
'discovery' => [ 'search' => [ 'key' => 'discoveryService', 'route' => 'ui5.shell.search', 'collectors' => [ Ui5ArtifactCollector::class => [ 'authorizer' => Ui5ArtifactConstrainer::class, // a VisibilityConstrainerInterface 'config' => [], // the collector's own ], ], ], ],
The assembler must ensure that:
| Methods | ||
|---|---|---|
public
|
assembleDiscoveryService(array $config): SearchServiceInterface
|
# |