[TYPO3-mvc] questions: @lazy, @inject, @api, constructors

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Jan 15 11:39:45 CET 2010


Hi,

>> 4. Is there a guideline/good practice rule which defines which fields of
>> a class should be initialized in its constructor?
> - definitely all ObjectStorages (Tx_Extbase_Persistence_ObjectStorage)

I wonder why I have to define all ObjectStorages in the constructor when 
the constructor is never called from inside extbase. Non automatically 
persisted/injected objects get built calling the constructor. I noticed 
this when I actually defined a ObjectStorage in the constructor and 
tried to used it in a getter/setter method.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list