I am planning to develop a plugin manager for my smartfox extension.
In brief, I would want to implement a functionality that is independent of the extensions but would get executed before and after handleEvent() and handleInternalEvent.
like
Code: Select all
public function preHandleEvent(command c, ...other args);
public function postHandleEvent(command c, ...other args);
public function preHandleInternalEvent(command c, ...other args);
public function postHandleInternalEvent(command c, ...other args);
I can do something like
Code: Select all
public function handleEvent(....)
{
pluginManager.preHandleEvent()
/*
* App logic
*/
pluginManager.postHandleEvent()
}
public function handleInternalEvent(....)
{
pluginManager.preHandleInternalEvent()
/*
* App logic
*/
pluginManager.postHandleInternalEvent()
}
Lapo, can you help?
Regards,
Yaswanth