NaifyView\Compiler\CompiledExpressionLiteralFastPathBuilder クラス

CompiledExpressionLiteralFastPathBuilder — compiled mainline の Compiled Expression Literal Fast Path Builder

template を generated PHP class へ落とす compile pipeline の一部。 大きな compiler へ責務を押し込まず、source 生成・依存計画・fast path などを小さく分ける。

使用例

// Engine が warm-hit できない template を compiled artifact へ変換する時に使う。
// 通常は View / Engine 経由で呼ばれ、アプリ側から直接操作しない。

プロパティ

名前型説明
private $unwrapOuterParentheses Closure string
private $findMatchingBracket Closure ?int
private $findMatchingBrace Closure ?int
private $buildResolvedValueExpression Closure string
private $buildMixedListLiteral Closure string
private $expressionEvaluator NaifyExpressionEvaluator

メソッド

メソッド説明
public __construct(NaifyExpressionEvaluator $expressionEvaluator, Closure $unwrapOuterParentheses, Closure $findMatchingBracket, Closure $findMatchingBrace, Closure $buildResolvedValueExpression, Closure $buildMixedListLiteral): void インスタンスを初期化する
public resolveLiteralExpression(string $expression): ?string `resolveLiteralExpression()` を実行する
public resolveListLiteralExpression(string $expression, string $scopeVar): ?string `resolveListLiteralExpression()` を実行する
public resolveMapLiteralExpression(string $expression, string $scopeVar): ?string `resolveMapLiteralExpression()` を実行する
public resolveMapLiteralKeyExpression(string $expression): ?string `resolveMapLiteralKeyExpression()` を実行する
public resolveRangeExpression(string $expression, string $scopeVar): ?string `resolveRangeExpression()` を実行する
public resolveAttributeScalarLiteralExpression(string $expression): ?string `resolveAttributeScalarLiteralExpression()` を実行する
public buildMixedListLiteral(array $entries): string `buildMixedListLiteral()` を実行する