veto is still used a lot

git-svn-id: file:///home/shish/svn/shimmie2/trunk@1122 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2008-12-08 20:40:01 +00:00
parent ff8400641e
commit 3ff15a1395
2 changed files with 8 additions and 0 deletions

View File

@ -5,10 +5,17 @@
*/
abstract class Event {
var $context;
var $vetoed = false;
var $veto_reason;
public function __construct(RequestContext $context) {
$this->context = $context;
}
public function veto($reason="") {
$this->vetoed = true;
$this->veto_reason = $reason;
}
}

View File

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