- /**
- * {@inheritdoc}
- *
- * @deprecated since version 2.5, to be removed in 3.0.
- */
- public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = null)
- {
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
-
- if (null === $propagatedGroup && Constraint::DEFAULT_GROUP === $group
- && ($this->hasGroupSequence() || $this->isGroupSequenceProvider())) {
- if ($this->hasGroupSequence()) {
- $groups = $this->getGroupSequence()->groups;
- } else {
- $groups = $value->getGroupSequence();
- }
-
- foreach ($groups as $group) {
- $this->accept($visitor, $value, $group, $propertyPath, Constraint::DEFAULT_GROUP);
-
- if (count($visitor->getViolations()) > 0) {
- break;
- }
- }
-
- return;
- }
-
- $visitor->visit($this, $value, $group, $propertyPath);
-
- if (null !== $value) {
- $pathPrefix = empty($propertyPath) ? '' : $propertyPath.'.';
-
- foreach ($this->getConstrainedProperties() as $property) {
- foreach ($this->getPropertyMetadata($property) as $member) {
- $member->accept($visitor, $member->getPropertyValue($value), $group, $pathPrefix.$property, $propagatedGroup);
- }
- }
- }
- }
-