[+FEATURE] Extbase: Enable Dependency Injection for Domain Models
authorBastian Waidelich <bastian@typo3.org>
Tue, 8 Mar 2011 17:45:21 +0000 (18:45 +0100)
committerBastian Waidelich <bastian@typo3.org>
Tue, 8 Mar 2011 17:45:21 +0000 (18:45 +0100)
commit58241db30d21491bcca467ce6c04d4990fdf92bc
tree9f3fa31755d69035a46fa3c118d71a87a97a5e60
parent51c47c222d6b4148a2ee3a4464bfced9401665b9
[+FEATURE] Extbase: Enable Dependency Injection for Domain Models

In order to avoid the constructor to be called,
domain objects are created by using PHPs unserialize() function.
This has the side-effect, that we need to inject
dependencies "manually" for those.
This is accomplished by adding a helper function
getEmptyObject() to the Object Container.
Thanks to Pascal Jungblut for the patches!

Change-Id: I49edab54eb810abc894f3f59fe8c46cf4ddfa464
Fixes: #11311
typo3/sysext/extbase/Classes/Object/Container/Container.php
typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapFactory.php
typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php
typo3/sysext/extbase/Classes/Property/Mapper.php
typo3/sysext/extbase/Tests/Unit/Object/Container/ContainerTest.php