Beispiel #1
0
 /**
  * Checks conditions by name and then evaulates results
  *
  * @param  array  $conditionNamesArr
  * @param  boolean  $redirectOnFail
  * @return void
  */
 private function checkConditionsArray($conditionNamesArr = array(), $redirectOnFail = false)
 {
     $resultsArr = array();
     foreach ($conditionNamesArr as $conditionName) {
         $resultsArr[] = $this->RuleManager->runCondition($conditionName, $redirectOnFail, false);
     }
     return $this->RuleManager->evaluateResults(array_flatten($resultsArr), $redirectOnFail);
 }
 /**
  * Uses array of rule names to create a map of names to paramter count
  *
  * @return array
  */
 public function getRuleParamMap($rules)
 {
     $map = array();
     foreach ($rules as $value) {
         $map[$value] = \RuleManager::getNumberOfRequiredParametersForRule($value);
     }
     return $map;
 }