eval() is a PHP function. See:
http://php.net/manual/es/function.eval.php
Plugins (well, "code event listeners") don't use eval. You specify a class+method and that is (auto)loaded and your code is run. The listener is given a specific set of arguments, similar to MediaWiki. This actually makes it documentable, and allows more backwards compatibility or at least documentation of potential issues.
… Plugins (well, "code event listeners") don't use eval. You specify a class+method and that is (auto)loaded and your code is run. The listener is given a specific set of arguments, similar to MediaWiki. This actually makes it documentable, and allows more backwards compatibility or at least documentation of potential issues. …
class MyEventClass {
public function execute($eventName, $eventClass, $eventObj) {
// ... my code
}
}
........... use such amazing technologies as HipHop for PHP.
Now I wonder if there was any origional vB developer who had anything to do with HipHop .....
Simpler really. You don't have to have an event object with an execute() method; you just tell it what the callback method is and it will call it statically.
We use essential cookies to make this site work, and optional cookies to enhance your experience.