class InterpretedEvaluator implements EelEvaluatorInterface (View source)

An expression evalutator that interprets expressions

There is no generated PHP code so this evaluator does not perform very good in multiple invocations.

Methods

mixed
evaluate(string $expression, Context $context)

Evaluate an expression under a given context

Details

mixed evaluate(string $expression, Context $context)

Evaluate an expression under a given context

Parameters

string $expression

The expression to evaluate

Context $context

The context to provide to the expression

Return Value

mixed

The evaluated expression

Exceptions

ParserException