[TYPO3-mvc] Dependency Injection in DomainObjectInterface
Pascal Jungblut
mail at pascal-jungblut.com
Mon Dec 6 19:09:51 CET 2010
Hey guys,
I was just wondering how you'd use dependency injection in domain objects? As transformToObject() uses "new $className;" to create domain objects, DI is not possible and it might not be needed for the vast majority of people. However, I'm using the observer-pattern on my domain objects to notifiy tx_enetcache when they change. For that it would be really great if I could somehow inject either the CacheObserver directly or the ObjectManager into the entity. How can I do that?
Regards
Pascal
More information about the TYPO3-project-typo3v4mvc
mailing list