private function mapQueryString(Request
$request, string
$type, MapQueryString
$attribute): ?object
{ if (!
$data =
$request->query->
all()) { return null;
} return $this->serializer->
denormalize($data,
$type, null, self::CONTEXT_DENORMALIZE +
$attribute->serializationContext
);
} private function mapRequestPayload(Request
$request, string
$type, MapRequestPayload
$attribute): ?object
{ if (null ===
$format =
$request->
getContentTypeFormat()) { throw new HttpException(Response::HTTP_UNSUPPORTED_MEDIA_TYPE, 'Unsupported format.'
);
} if ($attribute->acceptFormat && !\
in_array($format,
(array) $attribute->acceptFormat, true
)) { throw new HttpException(Response::HTTP_UNSUPPORTED_MEDIA_TYPE,
sprintf('Unsupported format, expects "%s", but "%s" given.',
implode('", "',
(array) $attribute->acceptFormat
),
$format));
} if ($data =
$request->request->
all()) { return $this->serializer->
denormalize($data,
$type, null, self::CONTEXT_DENORMALIZE +
$attribute->serializationContext
);
}