[TYPO3-core] RFC #9505: Make the caches in TYPO3 use the new caching framework

Martin Kutschker masi-no at spam-typo3.org
Wed Oct 8 10:42:03 CEST 2008


Xavier Perseguers schrieb:
> Hi,
> 
>>>> I suggested this once, but Robert told me that singletons are bad when
>>>> it comes to unit tests. I don't know, but maybe it helps (for unit
>>>> tests) if t3lib_div::makeInstance() would test if the class
>>>> implements a
>>>> certain (fake) interface or has a certain doc comment set and stores a
>>>> reference to the object in a static variable.
>>> Nice idea, I would welcome that, too!
>>
>> Which one? There are two proposals.
> 
> IMHO Not the one with doc comment as t3lib_div should then parse the php
> file everytime or integrate a caching mechanism for that.

Oh, actually there are three :) There is also one that checks for an
interface (eg t3lib_Interface_Singleton). That interface wouldn't define
any methods. It's just there for the benefit of t3lib_div::makeInstance().

Masi


More information about the TYPO3-team-core mailing list