RulesChecker (class)
Class RulesChecker
Contains logic for storing and checking rules on entities
RulesCheckers are used by Table classes to ensure that the current entity state satisfies the application logic and business rules.
RulesCheckers afford different rules to be applied in the create and update scenario.
Adding rules
Rules must be callable objects that return true/false depending on whether or not the rule has been satisfied. You can use RulesChecker::add(), RulesChecker::addCreate(), RulesChecker::addUpdate() and RulesChecker::addDelete to add rules to a checker.
Running checks
Generally a Table object will invoke the rules objects, but you can manually invoke the checks by calling RulesChecker::checkCreate(), RulesChecker::checkUpdate() or RulesChecker::checkDelete().