NaifyView\Executor\NodeRuntime クラス

NodeRuntime — 構文ノードを順に描画し、結果と制御指示を引き継ぐ

ノードの種類ごとの担当へ渡し、途中までの出力や更新したスコープを失わずにまとめる。

ASTを直接実行する経路の内部部品。通常の描画にはView::render()を使う。

プロパティ

名前型説明
private $controlRuntime ControlRuntime if / for-each runtime
private $markupRuntime MarkupRuntime markup coordinator
private $templateRuntime TemplateRuntime include / layout / slot runtime
private $inheritanceRuntime InheritanceRuntime extends / block runtime
private $stateRuntime StateRuntime scope mutation runtime
private $errorWrapper mixed NaifyViewException node error wrapper

メソッド

メソッド説明
public __construct(ControlRuntime $controlRuntime, MarkupRuntime $markupRuntime, TemplateRuntime $templateRuntime, InheritanceRuntime $inheritanceRuntime, StateRuntime $stateRuntime, callable $errorWrapper): void インスタンスを初期化する
public renderNodes(array $nodes, array $scope, array $state): NodeRenderResult `renderNodes()` を実行する
private renderNode(NodeInterface $node, array $scope, array $state): NodeRenderResult `renderNode()` を実行する
private createRenderNodesClosure(): Closure `createRenderNodesClosure()` を実行する
private buildLoopSignalResult(string $signal, array $scope, mixed $targetLoopName): NodeRenderResult `buildLoopSignalResult()` を実行する