[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 14:07:38 CEST 2008


Robert Lemke schrieb:
> Hi Martin,
> 
> On 08.10.2008, at 13:41, Martin Kutschker wrote:
> 
>> A simple solution is to have all singletons have a certain "magic"
>> property eg t3libSingleton. It doesn't matter if that is inherited from
>> an abstract singleton class or if it's an implementation of an interface
>> *. The only purpose is that it's presence can be detected with
>> property_exists() which works on classes (and objects). Mind that it's
>> of no important which value the property has, setting it to 0, NULL or
>> FALSE will not change the behaviour!
>>
>> This way we can avoid the reflection. We don't use it in 4.x and I don't
>> think we should bring it into the codebase.
> 
> Hmm, magic .... how about this one (demo code, not tested):

Oh yeah, we don't need to know in advance if we are dealing with a
singleton. It's so easy :-)

Masi


More information about the TYPO3-team-core mailing list