NaifyView\Runtime\CompiledValueRuntime クラス
CompiledValueRuntime — generated runtime ABI の Compiled Value Runtime
compiled template class から呼ばれる runtime surface。 compiler が生成する PHP と対になるため、変更時は generated code との互換を意識する。
使用例
// generated PHP class から呼ばれる runtime ABI。
// compiler が吐いたコードと対になるため、公開 API として直接使わない。
メソッド
| メソッド | 説明 |
|---|---|
public
outputValue(mixed $value): string
|
`outputValue()` を実行する |
public
stringifyValue(mixed $value): string
|
`stringifyValue()` を実行する |
public
normalizeNumericValue(mixed $value, string $expression): int|float
|
`normalizeNumericValue()` を実行する |
public
calculateArithmeticValue(mixed $left, mixed $right, string $operator, string $leftExpression, string $rightExpression): int|float
|
compiled arithmetic の除算・剰余を evaluator と同じ契約で計算する |
public
normalizeRangeValue(mixed $value, string $expression): int
|
`normalizeRangeValue()` を実行する |
private
describeObjectClass(object $value): string
|
`describeObjectClass()` を実行する |