WhenNode
in package
Represents a WHEN clause of a CASE expression
Table of Contents
Properties
- $case : mixed
- $condition : mixed
- $value : mixed
Methods
- __construct() : mixed
- Construct WHEN clause for a given CASE expression
- accept() : mixed
- Visit the current Node
- getCondition() : Literal|Node
- Getter for the condition of the WHEN clause
- getValue() : Literal|Node
- Getter for the value of the THEN clause
- then() : mixed
- add the THEN clause associated to the WHEN clause
Properties
$case
private
mixed
$case
$condition
private
mixed
$condition
$value
private
mixed
$value
Methods
__construct()
Construct WHEN clause for a given CASE expression
public
__construct(mixed $case, mixed $condition) : mixed
Parameters
- $case : mixed
-
the CASE expression
- $condition : mixed
-
the condition of the WHEN clause
accept()
Visit the current Node
public
accept(mixed $visitor) : mixed
Parameters
- $visitor : mixed
-
a visitor
Return values
mixed —the result string of the visit
getCondition()
Getter for the condition of the WHEN clause
public
getCondition() : Literal|Node
Return values
Literal|Node —the condition
getValue()
Getter for the value of the THEN clause
public
getValue() : Literal|Node
Return values
Literal|Node —the value
then()
add the THEN clause associated to the WHEN clause
public
then(mixed $value) : mixed
Parameters
- $value : mixed
-
the value of the THEN clause
Return values
mixed —the CASE expression of the current WHEN clause