final class MimeMessageNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface, CacheableSupportsMethodInterface
{ private NormalizerInterface&DenormalizerInterface
$serializer;
private array
$headerClassMap;
private \ReflectionProperty
$headersProperty;
public function __construct(private readonly PropertyNormalizer
$normalizer) { $this->headerClassMap =
(new \
ReflectionClassConstant(Headers::
class, 'HEADER_CLASS_MAP'
))->
getValue();
$this->headersProperty =
new \
ReflectionProperty(Headers::
class, 'headers'
);
} public function getSupportedTypes(?string
$format): array
{ $isCacheable = __CLASS__ ===
static::
class || $this->
hasCacheableSupportsMethod();
return [ Message::
class => $isCacheable,
Headers::
class => $isCacheable,
HeaderInterface::
class => $isCacheable,