NaifyView\Executor\NodeRenderResult クラス PHP 8.0+ 8.1 → readonly8.2 → readonly class
NodeRenderResult — ノードの出力・変数・ループ制御をひとまとめに運ぶ
単なる文字列では伝えられないbreak / continueの指示も、途中までの出力と一緒に返す。
ASTを直接実行する経路の内部部品。通常の描画にはView::render()を使う。
プロパティ
| 名前 | 型 | 説明 |
|---|---|---|
private
$output
|
string |
render 済み output |
private
$scope
|
array |
node 実行後 scope |
private
$signal
|
?string |
loop control signal |
private
$targetLoopName
|
?string |
target loop name for named break/continue |
メソッド
| メソッド | 説明 |
|---|---|
private
__construct(string $output, array $scope, ?string $signal, ?string $targetLoopName): void
|
インスタンスを初期化する |
public
static
fromOutput(string $output, array $scope): NodeRenderResult
|
`fromOutput()` を実行する |
public
static
fromSignal(string $output, array $scope, string $signal, ?string $targetLoopName): NodeRenderResult
|
`fromSignal()` を実行する |
public
getOutput(): string
|
`getOutput()` の値を返す |
public
getScope(): array
|
`getScope()` の値を返す |
public
getSignal(): ?string
|
`getSignal()` の値を返す |
public
getTargetLoopName(): ?string
|
`getTargetLoopName()` の値を返す |
public
hasSignal(): bool
|
`hasSignal()` かを返す |
public
isBreakSignal(): bool
|
`isBreakSignal()` かを返す |
public
isContinueSignal(): bool
|
`isContinueSignal()` かを返す |