NaifyView\Dialect\Naify\NaifyRootDirectivePlacementGuard クラス
NaifyRootDirectivePlacementGuard — Naify dialect の Naify Root Directive Placement Guard
Native template 構文の parser / evaluator / runtime contract を担当する。 Twig / Smarty 互換文化を混ぜず、Naify として持つ構文 surface をここで固定する。
使用例
// Naify dialect の parser / expression / runtime helper として使う。
// 通常は NaifyParser や compiler/executor から間接的に呼ばれる。
プロパティ
| 名前 | 型 | 説明 |
|---|---|---|
private
$documentRootDirectives
|
array |
document root 直下のみ許可する directive |
メソッド
| メソッド | 説明 |
|---|---|
public
requiresDocumentRoot(string $directiveName): bool
|
`requiresDocumentRoot()` を実行する |
public
isAllowedAtContainerDepth(string $directiveName, int $containerDepth): bool
|
`isAllowedAtContainerDepth()` かを返す |
private
normalizeDirectiveName(string $directiveName): string
|
`normalizeDirectiveName()` を実行する |