The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I finally found a way to emulate an event firing model from Java: callbacks. http://www.php.net/callback and http://www.php.net/create_function . Nowhere near as clean as Java with implementing interfaces and providing listeners, but it works:
PHP Code:
PHP Code:
Code:
installer.addUpdateListener(new InstallerUpdateListener()
{
public void statusChanged(int step, int stepCount, String status, Object result)
{
...
}
});
installer.upgrade();
|
|
#2
|
||||
|
||||
|
May I ask why you are using create_function()?
|
|
#3
|
|||
|
|||
|
To create an anonymous function rather than one publicly accessible by every other bit of code.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|