This commit is contained in:
xl
2024-08-29 17:01:08 +08:00
parent 337c52c744
commit c435af1156
15 changed files with 61 additions and 167 deletions
+2 -3
View File
@@ -35,12 +35,11 @@ class SwooleHttpResponseEmitter implements ResponseEmitterInterface
/**
* @param EventDispatch $dispatch
* @param EventProvider $provider
*/
public function __construct(readonly public EventDispatch $dispatch, readonly public EventProvider $provider)
public function __construct(readonly public EventDispatch $dispatch)
{
$this->afterRequest = new OnAfterRequest();
$this->events = $this->provider->getListenersForEvent($this->afterRequest);
$this->events = di(EventProvider::class)->getListenersForEvent($this->afterRequest);
}