EntityToIdentityConverter
class EntityToIdentityConverter extends AbstractTypeConverter (View source)
Converts the given entity to a JSON representation containing the identity and object type
Properties
protected string[] | $sourceTypes | The source types this converter can convert. |
|
protected string | $targetType | The target type this converter can convert to. |
|
protected int | $priority | The priority for this converter. |
|
protected PersistenceManagerInterface | $persistenceManager |
Methods
bool
canConvertFrom(object $source, string $targetType)
Check if the given object has an identity.
array
convertFrom(object $source, string $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
Converts the given source object to an array containing the type and identity.
Details
bool
canConvertFrom(object $source, string $targetType)
Check if the given object has an identity.
array
convertFrom(object $source, string $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
Converts the given source object to an array containing the type and identity.