11-05-2007, 04:44 PM
|
#6 (permalink)
|
|
The Reckoner
Join Date: Sep 2007
Posts: 437
Thanks: 22
|
There are many ways to do a "hook" system, one approach could be similar to this:
The whole process would work like this:
Client asks HookController to execute a hook (using getHook())
HookController asks the specified Hook (i.e. LoginHook) to execute.
After Hook execution any return value is returned to the HookController which is in turn returned to the Client.
The system could easily be extended to support plug ins and "families" of hooks - allowing you to group hooks into products.
__________________
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
|
|
|
|