CRUDUI PHP API

TernaryNode extends Node
in package

FinalYes

Ternary conditional: condition ? trueValue : falseValue.

EBNF is right-associative (then=ternary, else=ternary). evaluateValue returns the chosen branch's RAW value (string|number|boolean|null), not just a boolean.

Table of Contents

Properties

$condition  : Node
$falseValue  : Node
$trueValue  : Node

Methods

__construct()  : mixed
Build a ternary from its condition and two branch expressions.
toArray()  : array<string, mixed>
Serialize to {type,condition,trueValue,falseValue}.

Properties

Methods

__construct()

Build a ternary from its condition and two branch expressions.

public __construct(Node $condition, Node $trueValue, Node $falseValue) : mixed
Parameters
$condition : Node
$trueValue : Node
$falseValue : Node

toArray()

Serialize to {type,condition,trueValue,falseValue}.

public toArray() : array<string, mixed>
Return values
array<string, mixed>
On this page

Search results