改名
This commit is contained in:
@@ -35,7 +35,7 @@ class HttpFilter extends BaseObject
|
|||||||
/**
|
/**
|
||||||
* @param string $className
|
* @param string $className
|
||||||
* @param string $method
|
* @param string $method
|
||||||
* @return bool
|
* @return bool|Validator
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function check(string $className, string $method): bool|Validator
|
public function check(string $className, string $method): bool|Validator
|
||||||
|
|||||||
+12
-19
@@ -220,7 +220,7 @@ class Server extends HttpService
|
|||||||
* @throws ConfigException
|
* @throws ConfigException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function onProcessListener(): mixed
|
public function onProcessListener(): \Swoole\Server|null|Packet|Receive|Http|Websocket
|
||||||
{
|
{
|
||||||
if (!($this->swoole instanceof \Swoole\Server)) {
|
if (!($this->swoole instanceof \Swoole\Server)) {
|
||||||
return $this->swoole;
|
return $this->swoole;
|
||||||
@@ -284,12 +284,13 @@ class Server extends HttpService
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $config
|
* @param $config
|
||||||
* @return mixed
|
* @return \Swoole\Server|Packet|Receive|Http|Websocket|null
|
||||||
* @throws Exception
|
* @throws ConfigException
|
||||||
*/
|
* @throws Exception
|
||||||
private function create($config): mixed
|
*/
|
||||||
|
private function create($config): \Swoole\Server|null|Packet|Receive|Http|Websocket
|
||||||
{
|
{
|
||||||
$settings = Config::get('settings', []);
|
$settings = Config::get('settings', []);
|
||||||
if (!isset($this->server[$config['type']])) {
|
if (!isset($this->server[$config['type']])) {
|
||||||
@@ -322,8 +323,6 @@ class Server extends HttpService
|
|||||||
* @param $config
|
* @param $config
|
||||||
* @param $settings
|
* @param $settings
|
||||||
* @return \Swoole\Server|Packet|Receive|Http|Websocket|null
|
* @return \Swoole\Server|Packet|Receive|Http|Websocket|null
|
||||||
* @throws NotFindClassException
|
|
||||||
* @throws ReflectionException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function dispatchCreate($config, $settings): \Swoole\Server|Packet|Receive|Http|Websocket|null
|
private function dispatchCreate($config, $settings): \Swoole\Server|Packet|Receive|Http|Websocket|null
|
||||||
@@ -341,8 +340,6 @@ class Server extends HttpService
|
|||||||
/**
|
/**
|
||||||
* @param $config
|
* @param $config
|
||||||
* @return Http|Packet|Receive|Websocket|null
|
* @return Http|Packet|Receive|Websocket|null
|
||||||
* @throws NotFindClassException
|
|
||||||
* @throws ReflectionException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function addListener($config): Packet|Websocket|Receive|Http|null
|
private function addListener($config): Packet|Websocket|Receive|Http|null
|
||||||
@@ -432,10 +429,7 @@ class Server extends HttpService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $config
|
* @param $config
|
||||||
* @param $newListener
|
|
||||||
* @return Packet|Websocket|Receive|Http|null
|
* @return Packet|Websocket|Receive|Http|null
|
||||||
* @throws NotFindClassException
|
|
||||||
* @throws ReflectionException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function onListenerBind($config): Packet|Websocket|Receive|Http|null
|
private function onListenerBind($config): Packet|Websocket|Receive|Http|null
|
||||||
@@ -448,11 +442,10 @@ class Server extends HttpService
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $newListener
|
* @param string $type
|
||||||
* @param $config
|
* @throws Exception
|
||||||
* @throws Exception
|
*/
|
||||||
*/
|
|
||||||
private function bindServerEvent($type = self::TCP)
|
private function bindServerEvent($type = self::TCP)
|
||||||
{
|
{
|
||||||
if (in_array($type, [self::PACKAGE, self::TCP])) {
|
if (in_array($type, [self::PACKAGE, self::TCP])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user