Form data to typed classes
- dkorpar
- Member | 135
Are there any build in way of mapping form values to some kind of a typed
entity, where we can force variable types?
Maybe some integration with https://github.com/nette/schema,
would be specially interesting with php 7.4 and typed properties…
- Marek Bartoš
- Nette Blogger | 1260
$form->setMappedType(TypedEntity::class)
, internally calls
new TypedEntity
and assigns values to public properties. Don't know
about anything better and open-sourced yet.