Checks whether the given class is supported for normalization by this normalizer
mixed $data Data to normalize.:
string $format The format being (de-)serialized from or into.:
Boolean
Overrides NormalizerInterface::supportsNormalization
public function supportsNormalization($data, $format = null) {
try {
$this
->getNormalizer($data, $format);
} catch (RuntimeException $e) {
return false;
}
return true;
}