$allowedAttributes =
$this->
getAllowedAttributes($object,
$context, true
);
if (false !==
$allowedAttributes) { if ($context['cache_key'
]) { $this->attributesCache
[$key] =
$allowedAttributes;
} return $allowedAttributes;
} $attributes =
$this->
extractAttributes($object,
$format,
$context);
if ($mapping =
$this->classDiscriminatorResolver?->
getMappingForMappedObject($object)) { array_unshift($attributes,
$mapping->
getTypeProperty());
} if ($context['cache_key'
] && \stdClass::
class !== $class) { $this->attributesCache
[$key] =
$attributes;
} return $attributes;
}