NaifyView\Compiler\CompiledTemplateSurfaceDocumentBuilder クラス

CompiledTemplateSurfaceDocumentBuilder — compiled mainline の Compiled Template Surface Document Builder

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

使用例

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

メソッド

メソッド説明
public buildStaticDocumentNode(string $source): DocumentNode `buildStaticDocumentNode()` を実行する
public buildInterpolationOnlyDocumentNode(string $source, string $interpolationOpen = {{, string $interpolationClose = }}): DocumentNode `buildInterpolationOnlyDocumentNode()` を実行する
private appendTextChunk(array $children, string $source, int $startOffset, int $endOffset, int $cursorLine, int $cursorColumn): void `appendTextChunk()` を実行する
private consumeSegmentSpan(int $startOffset, int $startLine, int $startColumn, string $segment, int $cursorOffset, int $cursorLine, int $cursorColumn): SourceSpan `consumeSegmentSpan()` を実行する
private resolveSegmentEndPosition(int $startLine, int $startColumn, string $segment): array `resolveSegmentEndPosition()` を実行する
private buildWholeSourceSpan(string $source): SourceSpan `buildWholeSourceSpan()` を実行する