事件侦听器,用于更改调度事件的代码流

时间:2014-04-03 16:04:14

标签: php oop events

如果你有一个调度事件x的事件调度程序,并且这个事件有一个监听器,那么该监听器改变调度事件的代码流的最佳方式是什么?

// Task x was completed
$this->dispatcher->dispatch('event.x', $event);

// Can one of the event listeners for event x stop further code from executing
// after the event was dispatched?

0 个答案:

没有答案