-
Couldn't load subscription status.
- Fork 20
Open
Labels
pr welcomeFeature is accepted, it needs an implementationFeature is accepted, it needs an implementation
Description
Is it possible to programmatically configure custom transformations (like in callbacks) for specific properties or can this only be in attributes?
For example, with .NET's AutoMapper:
var configuration = new MapperConfiguration(cfg =>
cfg.CreateMap<Source, Destination>()
.ForMember(dest => dest.SomeValuefff)
);
or in a competing PHP AutoMapper:
$config = new AutoMapperConfig();
$config
->registerMapping(Employee::class, EmployeeDto::class)
->forMember('age', function (Employee $source) {
return date('Y') - $source->getBirthYear();
});
I didn't find anything about this in your documentation. It could be useful when we want to dynamically define the mappings.
Metadata
Metadata
Assignees
Labels
pr welcomeFeature is accepted, it needs an implementationFeature is accepted, it needs an implementation