PHP Class Hal\Component\BusinessRule\Evaluator

Show file Open project: Halleck45/DesignPatternDetector Class Usage Examples

Public Methods

Method Description
evaluate ( string $expression, array $variables ) : mixed Business rule engine Usage: BRE('x > 5', ['x' => 6] BRE('x => x > 5', 6]

Private Methods

Method Description
hydrates ( Symfony\Component\ExpressionLanguage\ExpressionLanguage $language )

Method Details

evaluate() public method

Business rule engine Usage: BRE('x > 5', ['x' => 6] BRE('x => x > 5', 6]
public evaluate ( string $expression, array $variables ) : mixed
$expression string
$variables array
return mixed