InMemoryComponentRegistry
The default in-memory {@see ComponentRegistryInterface}: a plain `name => ComponentDefinitionInterface` map, with no persistence or discovery — callers {@see register()} every component explicitly.
InMemoryComponentRegistry::has()
public function has(string $name): boolTrue when a component is registered under `$name`.
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string |
InMemoryComponentRegistry::get()
public function get(string $name): Milpa\Live\Contracts\Component\ComponentDefinitionInterfaceReturns the component registered under `$name`.
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string |
Throws
\RuntimeException If no component is registered under `$name`.
InMemoryComponentRegistry::register()
public function register(string $name, Milpa\Live\Contracts\Component\ComponentDefinitionInterface $component): voidRegisters `$component` under `$name`, replacing any component already registered under it.
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $component | Milpa\Live\Contracts\Component\ComponentDefinitionInterface |