IncludeConditionInterface
Source streams that contain conditions are split smaller parts and each condition creates a Condition node.
This interface is implemented by all conditions nodes. It allows "parking" the main condition token to be evaluated during AST building.
Tags
Table of Contents
Methods
- getConditionToken() : Token
- getConditionVerdict() : bool
- getOriginalConditionToken() : Token|null
- isConditionNegated() : bool
- True for ConditionElseInclude: The [ELSE] node of a condition.
- setConditionToken() : void
- Set and get the condition token: "[foo = bar]"
- setConditionVerdict() : void
- When a condition is evaluated, this is set to true of false depending on the condition result.
- setOriginalConditionToken() : void
- Conditions may use constants: "[foo = {$bar}]". This getter/setter allows storing the original condition token string.
Methods
getConditionToken()
public
getConditionToken() : Token
Return values
TokengetConditionVerdict()
public
getConditionVerdict() : bool
Return values
boolgetOriginalConditionToken()
public
getOriginalConditionToken() : Token|null
Return values
Token|nullisConditionNegated()
True for ConditionElseInclude: The [ELSE] node of a condition.
public
isConditionNegated() : bool
Return values
boolsetConditionToken()
Set and get the condition token: "[foo = bar]"
public
setConditionToken(Token $token) : void
Parameters
- $token : Token
setConditionVerdict()
When a condition is evaluated, this is set to true of false depending on the condition result.
public
setConditionVerdict(bool $verdict) : void
Parameters
- $verdict : bool
setOriginalConditionToken()
Conditions may use constants: "[foo = {$bar}]". This getter/setter allows storing the original condition token string.
public
setOriginalConditionToken(Token $token) : void
This is set in backend only in case a constant substitution has taken place. Otherwise, the "vanilla" condition token is identical, getOriginalConditionToken() returns null and the condition token should be fetched from getConditionToken().
Parameters
- $token : Token