改名
This commit is contained in:
@@ -17,6 +17,10 @@ use HttpServer\Http\Response;
|
||||
use HttpServer\Route\Router;
|
||||
use HttpServer\Server;
|
||||
|
||||
use HttpServer\Service\Http;
|
||||
use HttpServer\Service\Packet;
|
||||
use HttpServer\Service\Receive;
|
||||
use HttpServer\Service\Websocket;
|
||||
use Kafka\Producer;
|
||||
use Annotation\Annotation as SAnnotation;
|
||||
use Snowflake\Cache\Redis;
|
||||
@@ -357,6 +361,26 @@ abstract class BaseApplication extends Service
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Server
|
||||
* @throws ComponentException
|
||||
*/
|
||||
public function getServer(): Server
|
||||
{
|
||||
return $this->get('server');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Http|Packet|Receive|Websocket|null
|
||||
* @throws ComponentException
|
||||
*/
|
||||
public function getService(): Packet|Websocket|Receive|Http|null
|
||||
{
|
||||
return $this->getServer()->getServer();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return SAnnotation
|
||||
* @throws ComponentException
|
||||
|
||||
Reference in New Issue
Block a user