private function Serializer::getDenormalizer

1 call to Serializer::getDenormalizer()
Serializer::supportsDenormalization in drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php
Checks whether the given class is supported for denormalization by this normalizer

File

drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php, line 189

Class

Serializer
Serializer serializes and deserializes data

Namespace

Symfony\Component\Serializer

Code

private function getDenormalizer($data, $type, $format = null) {
  foreach ($this->normalizers as $normalizer) {
    if ($normalizer instanceof DenormalizerInterface && $normalizer
      ->supportsDenormalization($data, $type, $format)) {
      return $normalizer;
    }
  }
  throw new RuntimeException(sprintf('No denormalizer found for format "%s".', $format));
}