LiteralNode
extends Node
in package
FinalYes
Literal value. valueType is one of string|number|boolean|null. An unquoted identifier on a comparison right-hand side or in an `in` list is a string literal whose value is the identifier text (e.g. `.country == US` → 'US').
Table of Contents
Properties
- $value : string|int|float|bool|null
- $valueType : string
Methods
- __construct() : mixed
- Build a literal from its value kind and concrete value.
- toArray() : array<string, mixed>
- Serialize to {type,valueType,value}.
Properties
$value read-only
public
string|int|float|bool|null
$value
$valueType read-only
public
string
$valueType
Methods
__construct()
Build a literal from its value kind and concrete value.
public
__construct(string $valueType, string|int|float|bool|null $value) : mixed
Parameters
- $valueType : string
- $value : string|int|float|bool|null
toArray()
Serialize to {type,valueType,value}.
public
toArray() : array<string, mixed>