改名
This commit is contained in:
@@ -19,13 +19,13 @@ class ResponseEmitter
|
||||
|
||||
|
||||
/**
|
||||
* @param \Swoole\Http\Response|\Swoole\Http2\Response|Server $response
|
||||
* @param \Swoole\Http\Response|\Swoole\Http2\Response $response
|
||||
* @param ResponseInterface $emitter
|
||||
* @throws NotFindClassException
|
||||
* @throws ReflectionException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function sender(\Swoole\Http\Response|\Swoole\Http2\Response|Server $response, ResponseInterface $emitter)
|
||||
public function sender(\Swoole\Http\Response|\Swoole\Http2\Response $response, ResponseInterface $emitter): void
|
||||
{
|
||||
$content = $emitter->configure($response)->getContent();
|
||||
if ($content instanceof FileFormatter) {
|
||||
|
||||
@@ -22,7 +22,7 @@ class TcpEmitter implements Emitter
|
||||
* @throws \ReflectionException
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function sender(Server $response, ResponseInterface $emitter)
|
||||
public function sender(mixed $response, ResponseInterface $emitter): void
|
||||
{
|
||||
$formatter = $emitter->getContent();
|
||||
if ($formatter instanceof FileFormatter) {
|
||||
|
||||
@@ -21,7 +21,7 @@ class UdpEmitter implements Emitter
|
||||
* @throws \ReflectionException
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function sender(Server $response, ResponseInterface $emitter)
|
||||
public function sender(mixed $response, ResponseInterface $emitter): void
|
||||
{
|
||||
$clientInfo = $emitter->getClientInfo();
|
||||
$response->sendto($clientInfo['host'], $clientInfo['port'],
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace Server\Constrict;
|
||||
|
||||
use Kiri\Exception\NotFindClassException;
|
||||
use Server\ResponseInterface;
|
||||
use Swoole\WebSocket\Server;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -15,13 +14,13 @@ class WebSocketEmitter implements Emitter
|
||||
|
||||
|
||||
/**
|
||||
* @param Server $response
|
||||
* @param mixed $response
|
||||
* @param ResponseInterface $emitter
|
||||
* @throws NotFindClassException
|
||||
* @throws \ReflectionException
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function sender(Server $response, ResponseInterface $emitter)
|
||||
public function sender(mixed $response, ResponseInterface $emitter): void
|
||||
{
|
||||
$response->push($emitter->getClientId(), $emitter->getContent()->getData());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user