How to use existing hooks in your own extension

As you already know, hooks come in two flavours: callUserFunction and the getUserObj. Most of the core developers prefer the tasty getUserObj way - and not only because it has some fancy design pattern behind it (to be honest, it's not that fancy at all, but at least it has something to do with objects).

This is a companion discussion topic for the original entry at