ObjectToPopulateTrait
Table of Contents
Methods
- extractObjectToPopulate() : object|null
- Extract the `object_to_populate` field from the context if it exists and is an instance of the provided $class.
Methods
extractObjectToPopulate()
Extract the `object_to_populate` field from the context if it exists and is an instance of the provided $class.
protected
extractObjectToPopulate(string $class, array<string|int, mixed> $context[, string|null $key = null ]) : object|null
Parameters
- $class : string
-
The class the object should be
- $context : array<string|int, mixed>
- $key : string|null = null
-
They in which to look for the object to populate. Keeps backwards compatibility with
AbstractNormalizer.