better variable names
git-svn-id: file:///home/shish/svn/shimmie2/trunk@270 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
a9908508d0
commit
c1dd2b6009
2 changed files with 6 additions and 4 deletions
|
@ -4,10 +4,12 @@
|
||||||
* generic parent class
|
* generic parent class
|
||||||
*/
|
*/
|
||||||
class Event {
|
class Event {
|
||||||
var $_live = true;
|
var $vetoed = false;
|
||||||
|
var $veto_reason;
|
||||||
|
|
||||||
public function veto() {
|
public function veto($reason="") {
|
||||||
$this->_live = false;
|
$this->vetoed = true;
|
||||||
|
$this->veto_reason = $reason;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -330,7 +330,7 @@ function send_event($event) {
|
||||||
ksort($my_event_listeners);
|
ksort($my_event_listeners);
|
||||||
foreach($my_event_listeners as $listener) {
|
foreach($my_event_listeners as $listener) {
|
||||||
$listener->receive_event($event);
|
$listener->receive_event($event);
|
||||||
if(!$event->_live) break;
|
if($event->vetoed) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue