Closed BoShurik closed 6 years ago
$config ->registerMapping(Entity::class, DTO::class) ->reverseMap() ->beConstructedUsing(function (DTO $model, AutoMapperInterface $mapper) { $object = new Entity( $mapper->map($model->foo, Foo::class) ); return $object; }) ;
Second argument AutoMapperInterface $mapper can be omitted, so no BC brake here
AutoMapperInterface $mapper
Simple & useful, consider it merged! Thanks @BoShurik
Second argument
AutoMapperInterface $mapper
can be omitted, so no BC brake here