eee
This commit is contained in:
@@ -7,22 +7,12 @@ use Kiri\Di\Interface\ResponseEmitterInterface;
|
||||
use Kiri\Events\EventDispatch;
|
||||
use Kiri\Events\EventProvider;
|
||||
use Kiri\Server\Events\OnAfterRequest;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use ReflectionException;
|
||||
use SplPriorityQueue;
|
||||
|
||||
class SwowHttpResponseEmitter implements ResponseEmitterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @var EventProvider
|
||||
*/
|
||||
#[Container(EventProvider::class)]
|
||||
public EventProvider $provider;
|
||||
|
||||
|
||||
/**
|
||||
* @var EventDispatch
|
||||
*/
|
||||
@@ -48,7 +38,7 @@ class SwowHttpResponseEmitter implements ResponseEmitterInterface
|
||||
public function init(): void
|
||||
{
|
||||
$this->afterRequest = new OnAfterRequest();
|
||||
$this->events = $this->provider->getListenersForEvent($this->afterRequest);
|
||||
$this->events = di(EventProvider::class)->getListenersForEvent($this->afterRequest);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user