NaifyView\Executor\OutputRuntime クラス

OutputRuntime — 式の値をテンプレートの出力文字列へつなぐ

補間、属性内の式、フィルター、マクロ呼び出しを扱い、値の評価と出力処理をまとめる。

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

プロパティ

名前型説明
private $evaluator NaifyExpressionEvaluator expression evaluator
private $macroRuntime MacroRuntime macro call runtime
private $helperChainParser NaifyHelperChainParser explicit filter world parser
private $valueTransformRuntime NaifyValueTransformRuntime helper/filter/stringify owner

メソッド

メソッド説明
public __construct(NaifyExpressionEvaluator $evaluator, MacroRuntime $macroRuntime, ?NaifyValueTransformRuntime $valueTransformRuntime, ?NaifyHelperChainParser $helperChainParser): void インスタンスを初期化する
public renderInterpolation(string $expression, array $scope, array $state, callable $renderNodes): string `renderInterpolation()` を実行する
public renderAttributeValue(string $value, array $scope, array $state, callable $renderNodes): string `renderAttributeValue()` を実行する
private renderExpressionInterpolation(string $expression, array $scope, array $state, callable $renderNodes): string `renderExpressionInterpolation()` を実行する
private evaluateOutputExpression(string $expression, array $scope, array $state, callable $renderNodes): mixed `evaluateOutputExpression()` を実行する
private evaluateValueExpression(string $expression, array $scope, array $state, callable $renderNodes): mixed `evaluateValueExpression()` を実行する
private applyFilter(string $filterExpression, mixed $value, array $scope, array $state, callable $renderNodes): mixed `applyFilter()` を実行する
private applyFilterFromResolvedValue(string $filterName, string $argumentExpression, mixed $value, array $scope, array $state, callable $renderNodes): mixed `applyFilterFromResolvedValue()` を実行する
private isMacroCallableExpression(string $expression): bool `isMacroCallableExpression()` かを返す
private isPurePathExpressionForOutput(string $expression): bool `isPurePathExpressionForOutput()` かを返す
private findMatchingBracket(string $expression, int $start): ?int `findMatchingBracket()` を実行する
private isEscapedCharacter(string $expression, int $index): bool `isEscapedCharacter()` かを返す