创建版本
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php namespace App\Support;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher as BaseEventDispatcher;
|
||||
use Symfony\Component\EventDispatcher\GenericEvent;
|
||||
|
||||
class EventDispatcher extends BaseEventDispatcher
|
||||
{
|
||||
protected function doDispatch($listeners, $eventName, GenericEvent $event)
|
||||
{
|
||||
foreach ($listeners as $listener) {
|
||||
if ($event->isPropagationStopped()) {
|
||||
break;
|
||||
}
|
||||
$arguments = \call_user_func($listener, $event->getArguments(), $eventName, $this);
|
||||
$event->setArguments($arguments);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user