NaifyView\Executor\AstExecutor クラス
AstExecutor — AST を直接 render する executor
compiled mainline と比較するための AST execution path。 node runtime 群へ処理を分け、parser 結果を DOM 依存なしで描画する。
使用例
$executor = new AstExecutor($loader);
$html = $executor->render($request);
プロパティ
| 名前 | 型 | 説明 |
|---|---|---|
private
$evaluator
|
NaifyExpressionEvaluator |
expression evaluator |
private
$bindingParser
|
NaifyBindingParser |
with binding parser |
private
$templateScopeBindRuntime
|
TemplateScopeBindRuntime |
include/layout binding owner |
private
$templateLoader
|
TemplateLoader |
template path resolve / load owner |
private
$includeRuntime
|
IncludeRuntime |
include runtime |
private
$layoutRuntime
|
LayoutRuntime |
layout runtime |
private
$slotRuntime
|
SlotRuntime |
slot runtime |
private
$templateRuntime
|
TemplateRuntime |
include / layout / slot runtime |
private
$macroRuntime
|
MacroRuntime |
macro registry / call runtime |
private
$templateRecursionRuntime
|
TemplateRecursionRuntime |
include / layout / extends recursion guard |
private
$inheritanceRootRuntime
|
InheritanceRootRuntime |
inheritance root owner |
private
$blockRenderRuntime
|
BlockRenderRuntime |
inheritance block owner |
private
$inheritanceRuntime
|
InheritanceRuntime |
extends / block root runtime |
private
$outputRuntime
|
OutputRuntime |
interpolation / filter runtime |
private
$controlRuntime
|
ControlRuntime |
if / for-each runtime |
private
$markupRuntime
|
MarkupRuntime |
markup coordinator |
private
$stateRuntime
|
StateRuntime |
scope mutation runtime |
private
$nodeRuntime
|
NodeRuntime |
recursive node render runtime |
private
$specialVariableRuntime
|
NaifySpecialVariableRuntime |
`@naify.*` scope owner |
private
$templateRecursionLimit
|
int |
template recursion limit for include / layout / extends |
メソッド
| メソッド | 説明 |
|---|---|
public
__construct(?NaifyTokenizer $tokenizer, ?NaifyParser $parser, ?NaifyExpressionEvaluator $evaluator, ?NaifyBindingParser $bindingParser, array $templateRoots = '...', int $templateRecursionLimit = 8, array $filterHandlers = '...', array $callableProviders = '...', bool $autoEscape = false): void
|
インスタンスを初期化する |
public
setTemplateRecursionLimit(int $limit): void
|
`setTemplateRecursionLimit()` の値を設定する |
public
getTemplateRecursionLimit(): int
|
`getTemplateRecursionLimit()` の値を返す |
public
getStats(): array
|
`getStats()` の値を返す |
public
renderFile(string $templatePath, array $scope): string
|
`renderFile()` を実行する |
public
renderDocument(DocumentNode $document, array $scope, string $templatePath, string $templateSource): string
|
`renderDocument()` を実行する |
private
renderResolvedDocument(DocumentNode $document, array $scope, string $templatePath, string $templateSource, string $mode): string
|
`renderResolvedDocument()` を実行する |
private
createRuntimeSession(array $scope): RuntimeSession
|
`createRuntimeSession()` を実行する |
private
wrapNodeError(NodeInterface $node, array $state, Throwable $exception): NaifyViewException
|
`wrapNodeError()` を実行する |