function AbstractNormalizer::getAttributeMetadata
@internal
2 calls to AbstractNormalizer::getAttributeMetadata()
- AbstractNormalizer::getAttributeDenormalizationContext in vendor/
symfony/ serializer/ Normalizer/ AbstractNormalizer.php - Computes the denormalization context merged with current one. Metadata always wins over global context, as more specific.
- AbstractNormalizer::getAttributeNormalizationContext in vendor/
symfony/ serializer/ Normalizer/ AbstractNormalizer.php - Computes the normalization context merged with current one. Metadata always wins over global context, as more specific.
File
-
vendor/
symfony/ serializer/ Normalizer/ AbstractNormalizer.php, line 583
Class
- AbstractNormalizer
- Normalizer implementation.
Namespace
Symfony\Component\Serializer\NormalizerCode
protected function getAttributeMetadata(object|string $objectOrClass, string $attribute) : ?AttributeMetadataInterface {
if (!$this->classMetadataFactory) {
return null;
}
return $this->classMetadataFactory
->getMetadataFor($objectOrClass)
->getAttributesMetadata()[$attribute] ?? null;
}