Use this class to build expressions:ons:
php
$expr = Expr::greaterThan(20)->orLessThan(10);
You can evaluate the expression with another value {@link Expression::evaluate()}:
php
if ($expr->evaluate($value)) {
do something...
}
You can also evaluate expressions by arrays by passing the array keys as
second argument:
php
$expr = Expr::greaterThan(20, 'age')
->andStartsWith('Thomas', 'name');
$values = array(
'age' => 35,
'name' => 'Thomas Edison',
);
if ($expr->evaluate($values)) {
do something...
}