private function processFieldValues(ValuesBag $values, $fieldName, array &$inclusiveSqlGroup, array &$exclusiveSqlGroup) { $this->processSingleValues($values->getSingleValues(), $fieldName, $inclusiveSqlGroup); $this->processRanges($values->getRanges(), $fieldName, $inclusiveSqlGroup); $this->processCompares($values->getComparisons(), $fieldName, $inclusiveSqlGroup); $this->processPatternMatchers($values->getPatternMatchers(), $fieldName, $inclusiveSqlGroup); $this->processSingleValues($values->getExcludedValues(), $fieldName, $exclusiveSqlGroup, true); $this->processRanges($values->getExcludedRanges(), $fieldName, $exclusiveSqlGroup, true); $this->processPatternMatchers($values->getPatternMatchers(), $fieldName, $exclusiveSqlGroup, true); $this->processCompares($values->getComparisons(), $fieldName, $exclusiveSqlGroup, true); }
/** * @param ValuesBag $valuesBag * @param Constraint[]|Constraint $constraints */ private function validateValuesBag(ValuesBag $valuesBag, $constraints, $validationGroups = null) { foreach ($valuesBag->getSingleValues() as $i => $value) { $this->validateValue($value->getValue(), $value->getViewValue(), $constraints, 'singleValues[' . $i . '].value', $valuesBag, $validationGroups); } foreach ($valuesBag->getExcludedValues() as $i => $value) { $this->validateValue($value->getValue(), $value->getViewValue(), $constraints, 'excludedValues[' . $i . '].value', $valuesBag, $validationGroups); } foreach ($valuesBag->getRanges() as $i => $value) { $this->validateRange($value, $constraints, 'ranges[' . $i . ']', $valuesBag, $validationGroups); } foreach ($valuesBag->getExcludedRanges() as $i => $value) { $this->validateRange($value, $constraints, 'excludedRanges[' . $i . ']', $valuesBag, $validationGroups); } foreach ($valuesBag->getComparisons() as $i => $value) { $this->validateValue($value->getValue(), $value->getViewValue(), $constraints, 'comparisons[' . $i . '].value', $valuesBag, $validationGroups); } foreach ($valuesBag->getPatternMatchers() as $i => $value) { $this->validateValue($value->getValue(), $value->getValue(), $constraints, 'patternMatchers[' . $i . '].value', $valuesBag, $validationGroups); } }