[TYPO3-mvc] DataMapper vs. PropertyMapper

Viktor Livakivskyi invisible.kinder at gmail.com
Fri Oct 10 10:02:33 CEST 2014


Hi, List.

These two guys are still kind of mystic for me. Can somebody, please, give a short explanation, when each of them is invoked and how do they collaborate? Or give a link to doc, if avaliable.

What I know so far:
1) PropertyMapper is invoked in Controller actions, when an object needs to be created from request params.
2) PropertyMapper can be invoked manually on demand and do somtheing, like this $propertyMapper->convert();
3) It is possible to use TypeConverters with PropertyMapper to create an objects in a way you like
4) DataMapper is invoked, when object is created from db

So, my questions are:
1) Is it possible to use TypeConverters for DaraMapper? (e.g. I want to use Startegy pattern on $child property of $parent object, when $parent is created by DataMapper)
2) Does PropertyMapper invoked after DataMapper or do they share configuration?

Thank you in advance.


More information about the TYPO3-project-typo3v4mvc mailing list