public function Serializer::supportsDenormalization

Checks whether the given class is supported for denormalization by this normalizer

Parameters

mixed $data Data to denormalize from.:

string $type The class to which the data should be denormalized.:

string $format The format being deserialized from.:

Return value

Boolean

Overrides DenormalizerInterface::supportsDenormalization

File

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

Class

Serializer
Serializer serializes and deserializes data

Namespace

Symfony\Component\Serializer

Code

public function supportsDenormalization($data, $type, $format = null) {
  try {
    $this
      ->getDenormalizer($data, $type, $format = null);
  } catch (RuntimeException $e) {
    return false;
  }
  return true;
}