NaifyView\Dialect\Naify\NaifyExpressionPathResolver クラス
NaifyExpressionPathResolver — Naify dialect の Naify Expression Path Resolver
Native template 構文の parser / evaluator / runtime contract を担当する。 Twig / Smarty 互換文化を混ぜず、Naify として持つ構文 surface をここで固定する。
使用例
// Naify dialect の parser / expression / runtime helper として使う。
// 通常は NaifyParser や compiler/executor から間接的に呼ばれる。
プロパティ
| 名前 | 型 | 説明 |
|---|---|---|
private
$specialVariableRuntime
|
NaifySpecialVariableRuntime |
`@naify.*` / trusted roots owner |
private
$valueTransformRuntime
|
NaifyValueTransformRuntime |
scalar helper/filter owner |
private
$evaluateExpression
|
Closure |
mixed |
private
$splitArgumentList
|
Closure |
list<string> |
private
$loadPathPlan
|
Closure |
array{ |
メソッド
| メソッド | 説明 |
|---|---|
public
__construct(NaifySpecialVariableRuntime $specialVariableRuntime, NaifyValueTransformRuntime $valueTransformRuntime, Closure $evaluateExpression, Closure $splitArgumentList, Closure $loadPathPlan): void
|
インスタンスを初期化する |
public
resolvePath(string $expression, array $scope): mixed
|
`resolvePath()` を実行する |
public
isMissingPathExpression(string $expression, array $scope): bool
|
`isMissingPathExpression()` かを返す |
public
resolvePathValueWithExistence(string $expression, array $scope): mixed
|
Resolve a pure path once, retaining the difference between missing and null. |
private
loadPathPlan(string $expression): array
|
`loadPathPlan()` を実行する |
private
readFromScope(string $key, array $scope): mixed
|
`readFromScope()` を実行する |
private
probePathExistence(string $expression, array $scope): array
|
`probePathExistence()` を実行する |
private
readFromScopeState(string $key, array $scope): array
|
`readFromScopeState()` を実行する |
private
readParentScope(string $rootToken, array $steps): array
|
Parent roots expose public values only and never grant trusted method access. |
private
readSegmentState(mixed $value, mixed $segment): array
|
`readSegmentState()` を実行する |
private
readSegment(mixed $value, mixed $segment): mixed
|
`readSegment()` を実行する |
private
invokeScalarHelper(mixed $value, string $methodName, string $argumentExpression, array $scope): mixed
|
`invokeScalarHelper()` を実行する |
private
isTrustedRootAllowed(string $bindingName, array $scope): bool
|
`isTrustedRootAllowed()` かを返す |
private
buildTrustedRootUnavailableException(string $rootToken, string $expression): NaifyViewException
|
`buildTrustedRootUnavailableException()` を実行する |
private
invokeTrustedPathMethod(mixed $value, string $methodName, string $argumentExpression, array $scope, string $expression): mixed
|
`invokeTrustedPathMethod()` を実行する |
private
invokeTrustedPathMethodState(mixed $value, string $methodName, string $argumentExpression, array $scope, string $expression): array
|
`invokeTrustedPathMethodState()` を実行する |