改名
This commit is contained in:
@@ -9,6 +9,8 @@ use Kiri\Exception\ConfigException;
|
||||
use Kiri\Exception\NotFindClassException;
|
||||
use Kiri\Kiri;
|
||||
use ReflectionException;
|
||||
use Server\Constrict\ResponseEmitter;
|
||||
use Server\Constrict\TcpEmitter;
|
||||
use Server\ExceptionHandlerDispatcher;
|
||||
use Server\ExceptionHandlerInterface;
|
||||
use Server\SInterface\OnRequest;
|
||||
@@ -47,6 +49,7 @@ abstract class Http extends Server implements OnRequest
|
||||
$exceptionHandler = ExceptionHandlerDispatcher::class;
|
||||
}
|
||||
$this->exceptionHandler = Kiri::getDi()->get($exceptionHandler);
|
||||
$this->responseEmitter = Kiri::getDi()->get(ResponseEmitter::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Server\Abstracts;
|
||||
|
||||
use Annotation\Inject;
|
||||
use Server\Constrict\Emitter;
|
||||
use Server\Constrict\Response as CResponse;
|
||||
use Server\Constrict\ResponseEmitter;
|
||||
|
||||
@@ -18,9 +19,7 @@ trait ResponseHelper
|
||||
public CResponse $response;
|
||||
|
||||
|
||||
/** @var ResponseEmitter */
|
||||
#[Inject(ResponseEmitter::class)]
|
||||
public ResponseEmitter $responseEmitter;
|
||||
public Emitter $responseEmitter;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ use Kiri\Exception\ConfigException;
|
||||
use Kiri\Exception\NotFindClassException;
|
||||
use Kiri\Kiri;
|
||||
use ReflectionException;
|
||||
use Server\Constrict\TcpEmitter;
|
||||
use Server\Constrict\UdpEmitter;
|
||||
use Server\ExceptionHandlerDispatcher;
|
||||
use Server\ExceptionHandlerInterface;
|
||||
use Server\SInterface\OnReceive;
|
||||
@@ -37,6 +39,7 @@ abstract class Tcp extends Server implements OnReceive
|
||||
$exceptionHandler = ExceptionHandlerDispatcher::class;
|
||||
}
|
||||
$this->exceptionHandler = Kiri::getDi()->get($exceptionHandler);
|
||||
$this->responseEmitter = Kiri::getDi()->get(TcpEmitter::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ use Kiri\Exception\ConfigException;
|
||||
use Kiri\Exception\NotFindClassException;
|
||||
use Kiri\Kiri;
|
||||
use ReflectionException;
|
||||
use Server\Constrict\UdpEmitter;
|
||||
use Server\ExceptionHandlerDispatcher;
|
||||
use Server\ExceptionHandlerInterface;
|
||||
use Server\SInterface\OnPacket;
|
||||
@@ -42,6 +43,7 @@ abstract class Udp extends Server implements OnPacket
|
||||
$exceptionHandler = ExceptionHandlerDispatcher::class;
|
||||
}
|
||||
$this->exceptionHandler = Kiri::getDi()->get($exceptionHandler);
|
||||
$this->responseEmitter = Kiri::getDi()->get(UdpEmitter::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ use Kiri\Exception\ConfigException;
|
||||
use Kiri\Exception\NotFindClassException;
|
||||
use Kiri\Kiri;
|
||||
use ReflectionException;
|
||||
use Server\Constrict\ResponseEmitter;
|
||||
use Server\Constrict\WebSocketEmitter;
|
||||
use Server\ExceptionHandlerDispatcher;
|
||||
use Server\ExceptionHandlerInterface;
|
||||
use Server\SInterface\OnClose;
|
||||
@@ -45,6 +47,7 @@ abstract class Websocket extends Server implements OnHandshake, OnMessage, OnClo
|
||||
$exceptionHandler = ExceptionHandlerDispatcher::class;
|
||||
}
|
||||
$this->exceptionHandler = Kiri::getDi()->get($exceptionHandler);
|
||||
$this->responseEmitter = Kiri::getDi()->get(WebSocketEmitter::class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user