[TYPO3] how to generate link

Jan Bednarik info at bednarik.org
Wed Aug 1 16:21:33 CEST 2007


Sorry for off topic, but I can't help myself.

> http://t3flyers.wordpress.com/2007/08/01/using-the-typolink-function/

why do you need to create always new tslib_cObject instance?

$cObject = t3lib_div::makeInstance('tslib_cObject');

I don't wonder that Typo3 consumes that much memory. Isn't it better to 
use already created instance (the one from $GLOBALS['TSFE'])?

The best would be to implement Sigleton pattern on some classes in 
makeInstance, but I don't see this happening. So at least, we should use 
every available resource instead of creating new ones.

-- 
Jan Bednarik
www.bednarik.org - web about Typo3 in czech


More information about the TYPO3-english mailing list