[Typo3-dev] Hooks...
Christian Jul Jensen
christian at jul.net
Sat Dec 11 10:56:30 CET 2004
Hey
I'm sitting about to apply a hook, and taking a peek at the two ways
of doing it.
I'm kind of confused about the reason for having different ways of
doing it.
In roberts tutorial I read something like 'some like the callUserObj
way better because it follows some fancy design pattern', this must
have to be singleton.
Now the thing is, you can also call objects and have them instantiated
as singletons with the callUserFunction, in fact the only thing I can
see that is not equal or better with the callUserFunction is that you
can not define a clear signature of the method called from within the
hook, but have to pass everything as an array.
On the other hand you have the benefit of not having to specify the
methodname in the hook, thereby providing a higher level of
transparency, in fact the client can decide if it wants to call a
function or method on an object.
Did I miss something?
If not I think we should stick to one way of doing hooks, it's not
like we donøt have enough complexy in TYPO3 already, in fact I would
also like to see some kind of abstraction like
t3lib_extmgm::registerHook()
Have a good one!
--
- julle
More information about the TYPO3-dev
mailing list