Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/validator/Validator/RecursiveValidator.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
39 * of validated objects | 39 * of validated objects |
40 * @param ConstraintValidatorFactoryInterface $validatorFactory The factory for creating | 40 * @param ConstraintValidatorFactoryInterface $validatorFactory The factory for creating |
41 * constraint validators | 41 * constraint validators |
42 * @param ObjectInitializerInterface[] $objectInitializers The object initializers | 42 * @param ObjectInitializerInterface[] $objectInitializers The object initializers |
43 */ | 43 */ |
44 public function __construct(ExecutionContextFactoryInterface $contextFactory, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = array()) | 44 public function __construct(ExecutionContextFactoryInterface $contextFactory, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = []) |
45 { | 45 { |
46 $this->contextFactory = $contextFactory; | 46 $this->contextFactory = $contextFactory; |
47 $this->metadataFactory = $metadataFactory; | 47 $this->metadataFactory = $metadataFactory; |
48 $this->validatorFactory = $validatorFactory; | 48 $this->validatorFactory = $validatorFactory; |
49 $this->objectInitializers = $objectInitializers; | 49 $this->objectInitializers = $objectInitializers; |
115 * {@inheritdoc} | 115 * {@inheritdoc} |
116 */ | 116 */ |
117 public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null) | 117 public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null) |
118 { | 118 { |
119 // If a class name is passed, take $value as root | 119 // If a class name is passed, take $value as root |
120 return $this->startContext(is_object($objectOrClass) ? $objectOrClass : $value) | 120 return $this->startContext(\is_object($objectOrClass) ? $objectOrClass : $value) |
121 ->validatePropertyValue($objectOrClass, $propertyName, $value, $groups) | 121 ->validatePropertyValue($objectOrClass, $propertyName, $value, $groups) |
122 ->getViolations(); | 122 ->getViolations(); |
123 } | 123 } |
124 } | 124 } |