[TYPO3-mvc] questions: @lazy, @inject, @api, constructors
Jochen Rau
jochen.rau at typoplanet.de
Tue Jan 19 09:51:41 CET 2010
Hi Masi.
On 15.01.10 14:04, Martin Kutschker wrote:
> Jochen Rau schrieb:
>>
>> It's good practice IMO to initialize all properties before the are used
>> the first time.
>
> What is the v5 stance on strings? Should the be initialized in the constructor or is it ok to have a
> default value in the property definition.
I'm not really sure. But I use the constructor initialization only for
those properties which can not be initialized in the property definition
(objects). The Factory pattern is another solution to ensure invariants.
Regards
Jochen
More information about the TYPO3-project-typo3v4mvc
mailing list