[TYPO3] t3lib_div::makeInstance does not support initialization parameters

Xavier Perseguers typo3 at perseguers.ch
Mon Aug 18 19:04:18 CEST 2008


Hi Dmitry,

>> Does it mean that I should use the new keyword for such case? Or why 
>> does the framework force me to create a initialization function 
>> distinct from the constructor?
>>
>> I do not understand this...
> 
> $class = t3lib_div::makeInstanceClassName('tx_whatever');
> $inst = new $class($param);

Ouf! I saw this method but it seems I went to quick over it :-)

Thanks. I really appreciate this much more than having to call a special 
method after the initialization.

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en


More information about the TYPO3-english mailing list