[TYPO3-mvc] Mapping various Objects to a Domain Model

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Fri Jun 15 18:40:40 CEST 2012


Hello,

thanks for your idea about the data mapper.

But how would the datamapper know which property of
the JSON object belongs to which domain object property?

Does the datamapper also map domain objects to properties?

I will have a look to get a better
understanding of the datamapper.

Thanks,
Thomas

Frank Krüger schrieb:
> just a raw approach:
>
> - decode your JSON-Data into a php object (json_decode)
> - decide which model to use
> - map the decoded JSON-Data onto your Model
> (dataMapper->map('Tx_MyExt_Domain_Model_ServerXXX',
> $myJsonDecodedDataArray);


More information about the TYPO3-project-typo3v4mvc mailing list