コード例 #1
0
 /**
  * {@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());
     }
 }
コード例 #2
0
 /**
  * {@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());
     }
 }
コード例 #3
0
 /**
  * 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);
         }
     }
 }
コード例 #4
0
ファイル: Metadata.php プロジェクト: dev981/gaptest
 /**
  * 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);
 }
コード例 #5
0
 /**
  * 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);
 }