[TYPO3-mvc] How should/can I pass parameters to an object's constructor using dependency injection?

Sebastian Kurfürst sebastian at typo3.org
Mon Nov 22 07:24:54 CET 2010


Hey,
> If Tx_YourExt_SomeClass is an singleton as well, DI injects $someObject
> by contructor injection. If it's of scope prototype you need an other
> solution to set $someObject in $thatClass.
In that case you usually inject the ObjectManagerInterface and call
create() on that.

Greets,
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list