Interface EvaluationContext
- All Known Implementing Classes:
EvaluationContext.PlainEvaluationContext
,Macro.MacroEvaluationContext
interface EvaluationContext
The context of a template evaluation. This consists of the template variables and the template
macros. The template variables start with the values supplied by the evaluation call, and can
be changed by
#set
directives and during the execution of #foreach
and macro
calls. The macros are extracted from the template during parsing and never change thereafter.-
Nested Class Summary
Nested Classes -
Method Summary
-
Method Details
-
getVar
-
varIsDefined
-
setVar
Sets the given variable to the given value.- Returns:
- a Runnable that will restore the variable to the value it had before. If the variable
was undefined before this method was executed, the Runnable will make it undefined again.
This allows us to restore the state of
$x
after#foreach ($x in ...)
.
-