* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; trait ObjectToPopulateTrait { /** * Extract the `object_to_populate` field from the context if it exists * and is an instance of the provided $class. * * @param string $class The class the object should be * @param $context The denormalization context * @param string $key They in which to look for the object to populate. * Keeps backwards compatibility with `AbstractNormalizer`. * * @return object|null an object if things check out, null otherwise */ protected function extractObjectToPopulate($class, array $context, $key = null) { $key = $key ?: 'object_to_populate'; if (isset($context[$key]) && is_object($context[$key]) && $context[$key] instanceof $class) { return $context[$key]; } return null; } } __halt_compiler();----SIGNATURE:----s6mGYqoMz7jC40WI+qQYto/bEEEqUdAZK89vu3DgLZbBMUxo/9or9R2AqO28b9KNExzbZvYD+pleZeevysrXudrxy4znrT5oTHPPrR/aIW+gi2laQC6dBwu3DAfsyfZ7X2xG5O57/nO4uyPYsBgVc3eEN1vaNWv1tUAmKA/oZ54w7Ruvhzn+01isZEqJQSv5CenZMss8S8lK5k27dHS6+gO1SQzlhB4WOq1GQ1ZY+BTUSMeuv64PRUDPlSyzIVHHHP6W9zOUWTtDkRaG8ZXAz7xNzmnBqMXqIa2Wsk8AsNKYWnCPRvS1C8EmgLblAAUiIgtBgWQI9rT8vMTiudlCyFDSLnhnaxBP8WhWL+U5xUgnhtkVeXFhX+GAo5Oba67zaNmGNUT7JYjrv+egV38EoLBddBqqi2Rv6L2v/E/x+Sfwk+znoMyjdnChF1e49dVXdANGfU5EjiMnzztM0X8DNAQ3LeLRrJq0L8SGnLYXGjdfNLImajOmKfrHqM3Dkpg6h0Pr3oes7mn9zlehbClyWPqZZgIgnXERBuewDGG3KdleBNzSwCGZxJdE4VsLSvN3DxuHYQU5unshv7uXD3im8fu0twlqJPOFaIzttaWglsSecMDZ+cIkPeQ8uL1mdYjnGzs6dNX5jf7C+kzIkmWDMofdQraL8K/6OSebX4wIOIY=----ATTACHMENT:----OTk1ODM3MjAzOTI3MDA5MyA1MzA3Mjk0NDkwOTUzOTM4IDM3MTM2NzgzMDcyMjUwMDg=