TuiNodeRendererRegistryInterface
Resolves a {@see TuiNodeRendererInterface} by node via a register + supports-based lookup — the retained-tree counterpart of {@see \Milpa\Live\Contracts\Rendering\ComponentRendererRegistryInterface} on the component-renderer side of the render seam.
TuiNodeRendererRegistryInterface::register()
abstract public function register(Milpa\Live\Contracts\Tui\TuiNodeRendererInterface $renderer): voidRegisters a node renderer. Implementations that keep an ordered list and resolve by first match SHOULD prefer the most recently registered renderer when more than one claims to {@see TuiNodeRendererInterface::supports()} the same node.
Parameters
| Name | Type | Description |
|---|---|---|
| $renderer | Milpa\Live\Contracts\Tui\TuiNodeRendererInterface |
TuiNodeRendererRegistryInterface::resolve()
abstract public function resolve(Milpa\Live\ValueObjects\Tui\TuiNode $node): ?Milpa\Live\Contracts\Tui\TuiNodeRendererInterfaceLooks up the renderer that {@see TuiNodeRendererInterface::supports()} the given node.
Parameters
| Name | Type | Description |
|---|---|---|
| $node | Milpa\Live\ValueObjects\Tui\TuiNode |
Returns
`null` if no registered renderer supports this node — callers decide whether that is fatal (e.g. an unknown node type in the tree).