function AbstractNormalizerContextBuilder::withObjectToPopulate
Configures an object to be updated instead of creating a new instance.
If you have a nested structure, child objects will be overwritten with new instances unless you set AbstractObjectNormalizer::DEEP_OBJECT_TO_POPULATE to true.
File
-
vendor/
symfony/ serializer/ Context/ Normalizer/ AbstractNormalizerContextBuilder.php, line 52
Class
- AbstractNormalizerContextBuilder
- A helper providing autocompletion for available AbstractNormalizer options.
Namespace
Symfony\Component\Serializer\Context\NormalizerCode
public function withObjectToPopulate(?object $objectToPopulate) : static {
return $this->with(AbstractNormalizer::OBJECT_TO_POPULATE, $objectToPopulate);
}