Plugin Manager for smartfox
Posted: 19 Jul 2010, 09:57
Hi,
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
Is this possible?
I can do something like
But I don't want to do that. I have looked at registerForEvents() but no doc of any sort is available.
Lapo, can you help?
Regards,
Yaswanth
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