[TYPO3-core] RFC #10497: Mark t3lib_div::makeInstanceClassName() as deprecated
Martin Kutschker
masi-no at spam-typo3.org
Mon Mar 2 15:41:06 CET 2009
Ingo Renner schrieb:
> Dmitry Dulepov wrote:
>
>> Slooooooooooooooooooooooooooooow because of reflection.
>
> don't use it if you don't want to, stick to parameterless constructors:
>
> $myObject = t3lib_div::makeInstance();
> $myObject->setParam1();
> $myObject->setParam2();
> $myObject->setParam3();
>
> nobody's forcing you to use it
Actually you do :) The only drawback of
t3lib_div::makeInstanceClassname() is that it doesn't cope with
singletons. A singleton's constructor shouldn't take any parameters
anyway. So there is not much reason to deprecate the function.
Masi
More information about the TYPO3-team-core
mailing list