public function __construct(ClassMetadataFactoryInterface
$classMetadataFactory = null, NameConverterInterface
$nameConverter = null, PropertyTypeExtractorInterface
$propertyTypeExtractor = null, ClassDiscriminatorResolverInterface
$classDiscriminatorResolver = null, callable
$objectClassResolver = null, array
$defaultContext =
[]) { parent::
__construct($classMetadataFactory,
$nameConverter,
$propertyTypeExtractor,
$classDiscriminatorResolver,
$objectClassResolver,
$defaultContext);
if (!
isset($this->defaultContext
[self::NORMALIZE_VISIBILITY
])) { $this->defaultContext
[self::NORMALIZE_VISIBILITY
] = self::NORMALIZE_PUBLIC | self::NORMALIZE_PROTECTED | self::NORMALIZE_PRIVATE;
} } public function getSupportedTypes(?string
$format): array
{ return ['object' => __CLASS__ ===
static::
class || $this->
hasCacheableSupportsMethod()];
} /**
* @param array $context
*/
public function supportsNormalization(mixed
$data, string
$format = null /* , array $context = [] */
): bool
{ return parent::
supportsNormalization($data,
$format) &&
$this->
supports($data::
class);
} /**
* @param array $context
*/