[TYPO3-core] RFC #9505: Make the caches in TYPO3 use the new caching framework
Ingo Renner
ingo at typo3.org
Wed Oct 8 17:54:22 CEST 2008
Robert Lemke wrote:
Hi Robert,
> well, almost true. With Reflection you can check if a class implements
> a certain interface.
right, but as you mentioned it's slow and this is also why I didn't
consider it...
> Certainly, reflection is slow, but that's why we have a Reflection Service
> in FLOW3 which caches the reflection information. For determining if a
> class implements a certain interface we have this method:
>
> public function isClassImplementationOf($className, $interfaceName) {}
sure all cool, but I think that's a bit too much for this simple
situation. As said I'd just use method_exists($className, $methodName)
and check whether there's a getInstance().
This is of course not as sophisticated but the chance that it indeed is
a singleton is quite high I'd say.
But all this of course is also not topic of this RFC ;)
Ingo
--
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2
More information about the TYPO3-team-core
mailing list