function ObjectNormalizer::setAttributeValue
Overrides AbstractObjectNormalizer::setAttributeValue
File
-
vendor/
symfony/ serializer/ Normalizer/ ObjectNormalizer.php, line 143
Class
- ObjectNormalizer
- Converts between objects and arrays using the PropertyAccess component.
Namespace
Symfony\Component\Serializer\NormalizerCode
protected function setAttributeValue(object $object, string $attribute, mixed $value, ?string $format = null, array $context = []) : void {
try {
$this->propertyAccessor
->setValue($object, $attribute, $value);
} catch (NoSuchPropertyException) {
// Properties not found are ignored
}
}