class ExpressionLanguage
Allows to compile and evaluate expressions written in your own DSL.
Methods
| __construct(ParserCacheInterface $cache = null, array $providers = array()) | ||
| string | compile(Expression|string $expression, array $names = array()) Compiles an expression source code. | |
| string | evaluate(Expression|string $expression, array $values = array()) Evaluate an expression. | |
| ParsedExpression | parse(Expression|string $expression, array $names) Parses an expression. | |
| register(string $name, callable $compiler, callable $evaluator) Registers a function. | ||
| addFunction(ExpressionFunction $function) | ||
| registerProvider(ExpressionFunctionProviderInterface $provider) |
Details
__construct(ParserCacheInterface $cache = null, array $providers = array())
string compile(Expression|string $expression, array $names = array())
Compiles an expression source code.
string evaluate(Expression|string $expression, array $values = array())
Evaluate an expression.
ParsedExpression parse(Expression|string $expression, array $names)
Parses an expression.
register(string $name, callable $compiler, callable $evaluator)
Registers a function.
Please login to continue.