变更
This commit is contained in:
+2
-1
@@ -43,7 +43,8 @@ class EventDispatch extends Component implements EventDispatcherInterface
|
||||
$lists->top();
|
||||
while ($lists->valid()) {
|
||||
try {
|
||||
call_user_func($lists->current(), $event);
|
||||
$current = $lists->current();
|
||||
call_user_func($current, $event);
|
||||
} catch (\Throwable $exception) {
|
||||
$this->logger->error($exception->getMessage(), [$exception]);
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class EventProvider implements ListenerProviderInterface
|
||||
public function getListenersForEvent(object $event): SplPriorityQueue
|
||||
{
|
||||
$queue = new SplPriorityQueue();
|
||||
$queue->setExtractFlags(SplPriorityQueue::EXTR_BOTH);
|
||||
$queue->setExtractFlags(SplPriorityQueue::EXTR_DATA);
|
||||
// TODO: Implement getListenersForEvent() method.
|
||||
foreach ($this->_listeners[get_class($event)] ?? [] as $listener) {
|
||||
$queue->insert($listener->listener, $listener->priority);
|
||||
|
||||
Reference in New Issue
Block a user