function PrimitiveDataNormalizer::getSupportedTypes

Overrides NormalizerBase::getSupportedTypes

File

core/modules/serialization/src/Normalizer/PrimitiveDataNormalizer.php, line 51

Class

PrimitiveDataNormalizer
Converts primitive data objects to their casted values.

Namespace

Drupal\serialization\Normalizer

Code

public function getSupportedTypes(?string $format) : array {
  return [
    PrimitiveInterface::class => TRUE,
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.