/** * {@inheritdoc} * * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = null) { $visitor->visit($this, $value, $group, $propertyPath); if ($this->isCascaded()) { $visitor->validate($value, $propagatedGroup ?: $group, $propertyPath, $this->isCollectionCascaded(), $this->isCollectionCascadedDeeply()); } }
/** * {@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); $visitor->visit($this, $value, $group, $propertyPath); if ($this->isCascaded()) { $visitor->validate($value, $propagatedGroup ?: $group, $propertyPath, $this->isCollectionCascaded(), $this->isCollectionCascadedDeeply()); } }
/** * Overrides Metadata::accept(). */ public function accept(ValidationVisitorInterface $visitor, $typed_data, $group, $propertyPath) { // To let all constraints properly handle empty structures, pass on NULL // if the data structure is empty. That way existing NotNull or NotBlank // constraints work as expected. if ($typed_data->isEmpty()) { $typed_data = NULL; } $visitor->visit($this, $typed_data, $group, $propertyPath); $pathPrefix = isset($propertyPath) && $propertyPath !== '' ? $propertyPath . '.' : ''; if ($typed_data) { foreach ($typed_data as $name => $data) { $metadata = $this->factory->getMetadataFor($data, $name); $metadata->accept($visitor, $data, $group, $pathPrefix . $name); } } }
/** * Implements MetadataInterface::accept(). */ public function accept(ValidationVisitorInterface $visitor, $typed_data, $group, $propertyPath) { // @todo: Do we have to care about groups? Symfony class metadata has // $propagatedGroup. $visitor->visit($this, $this->typedDataManager->getCanonicalRepresentation($typed_data), $group, $propertyPath); }
/** * Implements MetadataInterface::accept(). */ public function accept(ValidationVisitorInterface $visitor, $typed_data, $group, $propertyPath) { // @todo: Do we have to care about groups? Symfony class metadata has // $propagatedGroup. $visitor->visit($this, $typed_data->getValue(), $group, $propertyPath); }