EntityPrivilegeExpressionEvaluator
class EntityPrivilegeExpressionEvaluator extends CompilingEvaluator (View source)
An evaluator that compiles expressions down to PHP code
This simple implementation will lazily parse and evaluate the generated PHP code into a function with a name built from the hashed expression.
Properties
protected closure[] | $evaluatedExpressions | Runtime cache of execution ready closures. |
from CompilingEvaluator |
protected StringFrontend | $expressionCache | from CompilingEvaluator |
Methods
injectExpressionCache(StringFrontend $expressionCache)
TODO: As soon as we support PSR-16 (Simple Cache) this could be replaced by a simple cache.
from
CompilingEvaluator
mixed
from
CompilingEvaluator
string
generateEvaluatorCode(string $expression)
Internal generator method
Details
injectExpressionCache(StringFrontend $expressionCache)
TODO: As soon as we support PSR-16 (Simple Cache) this could be replaced by a simple cache.
mixed
evaluate(string $expression, Context $context)
Evaluate an expression under a given context
protected string
generateEvaluatorCode(string $expression)
Internal generator method
Used by unit tests to debug generated PHP code.