You are here

public function PropertyNormalizer::supportsNormalization in Zircon Profile 8

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

Checks whether the given class is supported for normalization by this normalizer.

Parameters

mixed $data Data to normalize.:

string $format The format being (de-)serialized from or into.:

Return value

bool

Overrides NormalizerInterface::supportsNormalization

File

vendor/symfony/serializer/Normalizer/PropertyNormalizer.php, line 128

Class

PropertyNormalizer
Converts between objects and arrays by mapping properties.

Namespace

Symfony\Component\Serializer\Normalizer

Code

public function supportsNormalization($data, $format = null) {
  return is_object($data) && !$data instanceof \Traversable && $this
    ->supports(get_class($data));
}