ability to veto events

git-svn-id: file:///home/shish/svn/shimmie2/trunk@268 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-07-12 08:30:51 +00:00
parent 45343a8ce9
commit b8b968ab56
2 changed files with 6 additions and 0 deletions

View file

@ -4,5 +4,10 @@
* generic parent class
*/
class Event {
var $_live = true;
public function veto() {
$this->_live = false;
}
}
?>

View file

@ -330,6 +330,7 @@ function send_event($event) {
ksort($my_event_listeners);
foreach($my_event_listeners as $listener) {
$listener->receive_event($event);
if(!$event->_live) break;
}
}