You are here

public function CustomNormalizer::supportsDenormalization in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Normalizer/CustomNormalizer.php \Symfony\Component\Serializer\Normalizer\CustomNormalizer::supportsDenormalization()

Checks if the given class implements the NormalizableInterface.

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

bool

Overrides DenormalizerInterface::supportsDenormalization

File

vendor/symfony/serializer/Normalizer/CustomNormalizer.php, line 60

Class

CustomNormalizer
@author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Symfony\Component\Serializer\Normalizer

Code

public function supportsDenormalization($data, $type, $format = null) {
  $class = new \ReflectionClass($type);
  return $class
    ->isSubclassOf('Symfony\\Component\\Serializer\\Normalizer\\DenormalizableInterface');
}