PHP API: IR/Expr
Classes in the IR/Expr namespace.
Expr
Source: Expr.php
Base IR expression type.
Expression nodes model runtime-evaluated values used by nodes, actions, and effects.
Group: IR/Expr
Example
Methods
val
Create a literal-value expression.
Parameters
- mixed $v Literal value.
Returns: self
read
Create an atom-read expression.
Parameters
- Atom $a Atom definition.
Returns: self
op
Create a binary operation expression.
Parameters
- string $name Operation name.
- Expr|int|float|string|bool $a Left operand.
- Expr|int|float|string|bool $b Right operand.
Returns: self
concat
Create a string-concatenation expression.
Returns: self
ensure
Normalize scalar values into expression nodes.
Parameters
- Expr|int|float|string|bool $x Input expression or scalar.
Returns: Expr
event
Create an event-path expression.
Parameters
- string $path Event payload path.
Returns: self
num
Create a numeric-cast expression.
Parameters
- Expr $x Input expression.
Returns: self
str
Create a string-cast expression.
Parameters
- Expr $x Input expression.
Returns: self
item
Create a list-item expression path accessor.
Parameters
- string $path Item path.
Returns: self
not
Create a logical-not expression.
Parameters
- self $x Input expression.
Returns: self
ExprConcat
Source: ExprConcat.php
IR expression for string concatenation.
Evaluates all parts in order and concatenates the resulting values.
Group: IR/Expr
Example
Methods
__construct
Build a concat expression.
Parameters
- array<int, Expr> $parts Expression parts.
collectAtoms
Collect atom dependencies from concat parts.
Parameters
- callable $collect Collector callback.
Returns: void
jsonSerialize
Encode this concat expression as runtime IR payload.
Returns: array<string, mixed>
ExprEvent
Source: ExprEvent.php
IR expression for reading values from event payloads.
Group: IR/Expr
Example
Methods
__construct
Build an event expression.
Parameters
- string $path Event payload path.
jsonSerialize
Encode this event expression as runtime IR payload.
Returns: array<string, string>
ExprItem
Source: ExprItem.php
IR expression for reading values from repeat-item context.
Group: IR/Expr
Example
Methods
__construct
Build an item expression.
Parameters
- string $path Item context path.
jsonSerialize
Encode this item expression as runtime IR payload.
Returns: array<string, string>
ExprNot
Source: ExprNot.php
IR expression for logical negation.
Group: IR/Expr
Example
Methods
__construct
Build a logical-not expression.
Parameters
- Expr $x Input expression.
jsonSerialize
Encode this not expression as runtime IR payload.
Returns: array<string, mixed>
ExprNumCast
Source: ExprNumCast.php
IR expression for numeric casting.
Group: IR/Expr
Example
Methods
__construct
Build a numeric-cast expression.
Parameters
- Expr $x Input expression.
jsonSerialize
Encode this numeric-cast expression as runtime IR payload.
Returns: array<string, mixed>
ExprOp
Source: ExprOp.php
IR expression for generic operations.
Stores operation name and up to three operands.
Group: IR/Expr
Example
Methods
__construct
Build an operation expression.
Parameters
- string $name Operation name.
collectAtoms
Collect atom dependencies from all operands.
Parameters
- callable $collect Collector callback.
Returns: void
jsonSerialize
Encode this operation expression as runtime IR payload.
Returns: array<string, mixed>
ExprParam
Source: ExprParam.php
IR expression for route path parameters.
Reads values from the current route parameter map.
Group: IR/Expr
Example
Methods
__construct
Build a route-param expression.
Parameters
- string $name Parameter name.
jsonSerialize
Encode this route-param expression as runtime IR payload.
Returns: array<string, string>
ExprProp
Source: ExprProp.php
IR expression for reading component prop values.
Group: IR/Expr
Example
Methods
__construct
Build a prop expression.
Parameters
- string $name Prop name.
jsonSerialize
Encode this prop expression as runtime IR payload.
Returns: array<string, string>
ExprQuery
Source: ExprQuery.php
IR expression for URL query parameters.
Reads values from the current route query map.
Group: IR/Expr
Example
Methods
__construct
Build a query-param expression.
Parameters
- string $name Query key.
jsonSerialize
Encode this query-param expression as runtime IR payload.
Returns: array<string, string>
ExprRead
Source: ExprRead.php
IR expression for reading atom values.
Group: IR/Expr
Example
Methods
__construct
Build an atom-read expression.
Parameters
- Atom $a Atom definition.
collectAtoms
Collect atom dependencies for this read expression.
Parameters
- callable $collect Collector callback.
Returns: void
jsonSerialize
Encode this read expression as runtime IR payload.
Returns: array<string, string>
ExprStrCast
Source: ExprStrCast.php
IR expression for string casting.
Group: IR/Expr
Example
Methods
__construct
Build a string-cast expression.
Parameters
- Expr $x Input expression.
jsonSerialize
Encode this string-cast expression as runtime IR payload.
Returns: array<string, mixed>
ExprStringify
Source: ExprStringify.php
IR expression for JSON stringification.
Group: IR/Expr
Example
Methods
__construct
Build a stringify expression.
Parameters
- Expr|int|float|string|bool|null $value Value to stringify.
- int $space Indentation spaces.
collectAtoms
Collect atom dependencies from stringify input.
Parameters
- callable $collect Collector callback.
Returns: void
jsonSerialize
Encode this stringify expression as runtime IR payload.
Returns: array<string, mixed>
ExprVal
Source: ExprVal.php
IR expression for literal values.
Group: IR/Expr
Example
Methods
__construct
Build a literal-value expression.
Parameters
- mixed $v Literal value.
collectAtoms
Literal values have no atom dependencies.
Parameters
- callable $collect Collector callback.
Returns: void
jsonSerialize
Encode this literal expression as runtime IR payload.
Returns: array<string, mixed>