[Flow] Dependency Injection on Abstract Class
Christian Loock
chl at vkf-renzel.de
Thu Aug 8 11:41:59 CEST 2013
Hi,
thats very usefull to know. Since I have always used Relative Namespace
References I was a bit confused why it wouldnt work.
Fortunatly, ActionController had the ObjectManager Injected, so I used
this as a workarround.
Thanks to you I know now how to fix that little mess.
Am 08.08.2013 11:35, schrieb Bastian Waidelich:
> Christian Loock wrote:
>
> Hi Christian,
>
>> May it be, that Dependency Injection does not work in abstract classes?
>> http://pastebin.com/0Rxrzmhy
>
> Apparently DI doesn't work with relative namespaces yet in abstract
> classes (see [1]).
>
> But if you refer to the fully qualified class name everything should
> work.
>
> In your example you're missing a leading slash, it should be
> "\TYPO3\Flow\I18n\Translator" not "TYPO3\Flow\I18n\Translator".
>
> But the log should tell you about it!?
>
> [1] http://forge.typo3.org/issues/50909
>
More information about the Flow
mailing list