2 Commits

Author SHA1 Message Date
as2252258 a4c50f975e modify plugin name 2022-02-23 16:32:08 +08:00
as2252258 f7630a4c2a Revert "改名"
This reverts commit fdf58326
2022-01-20 19:04:16 +08:00
+5 -2
View File
@@ -4,6 +4,8 @@ namespace Kiri\Events;
use Kiri\Abstracts\Component;
use Kiri;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\EventDispatcher\StoppableEventInterface;
@@ -18,11 +20,12 @@ class EventDispatch extends Component implements EventDispatcherInterface
/**
* @param object $event
* @return object
* @throws \ReflectionException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function dispatch(object $event): object
{
$lists = $this->eventProvider->getListenersForEvent($event);
$lists = $this->getEventProvider()->getListenersForEvent($event);
foreach ($lists as $listener) {
/** @var Struct $list */
$listener($event);