5 Commits

Author SHA1 Message Date
as2252258 0228ed2241 改名 2021-11-29 11:44:03 +08:00
as2252258 168ceac6a8 改名 2021-11-29 10:58:45 +08:00
as2252258 40f1a49e77 1 2021-11-27 17:43:29 +08:00
as2252258 3c3d0a4107 改名 2021-11-18 11:37:13 +08:00
as2252258 f4b137ac91 改名 2021-11-05 15:36:40 +08:00
3 changed files with 31 additions and 5 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace PHPSTORM_META {
// Reflect
use Kiri\Di\Container;
use Psr\Container\ContainerInterface;
override(ContainerInterface::get(0), map('@'));
override(Container::get(0), map('@'));
override(Container::make(0), map('@'));
override(Container::create(0), map('@'));
// override(\Hyperf\Utils\Context::get(0), map('@'));
// override(\make(0), map('@'));
override(\di(0), map('@'));
override(\duplicate(0), map('@'));
}
+1 -1
View File
@@ -11,7 +11,7 @@
"require": { "require": {
"php": ">=8.0", "php": ">=8.0",
"ext-json": "*", "ext-json": "*",
"game-worker/kiri-consul": "dev-master", "game-worker/kiri-consul": "^v1.0",
"psr/http-client": "^1.0", "psr/http-client": "^1.0",
"psr/http-message": "^1.0" "psr/http-message": "^1.0"
}, },
+12 -4
View File
@@ -8,15 +8,17 @@ use Http\Handler\Router;
use Kiri\Abstracts\Component; use Kiri\Abstracts\Component;
use Kiri\Abstracts\Config; use Kiri\Abstracts\Config;
use Kiri\Consul\Agent; use Kiri\Consul\Agent;
use Kiri\Di\ContainerInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Kiri\Events\EventProvider; use Kiri\Events\EventProvider;
use Kiri\Exception\ConfigException; use Kiri\Exception\ConfigException;
use Kiri\Kiri; use Kiri\Kiri;
use Psr\Container\NotFoundExceptionInterface;
use Server\Events\OnBeforeShutdown; use Server\Events\OnBeforeShutdown;
use Server\Events\OnStart; use Server\Events\OnStart;
use Server\SInterface\OnCloseInterface; use Server\Contract\OnCloseInterface;
use Server\SInterface\OnConnectInterface; use Server\Contract\OnConnectInterface;
use Server\SInterface\OnReceiveInterface; use Server\Contract\OnReceiveInterface;
use Swoole\Coroutine; use Swoole\Coroutine;
use Swoole\Coroutine\Channel; use Swoole\Coroutine\Channel;
use Swoole\Server; use Swoole\Server;
@@ -58,6 +60,8 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa
/** /**
* @param OnBeforeShutdown $beforeShutdown * @param OnBeforeShutdown $beforeShutdown
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function onBeforeShutdown(OnBeforeShutdown $beforeShutdown) public function onBeforeShutdown(OnBeforeShutdown $beforeShutdown)
{ {
@@ -70,7 +74,10 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa
/** /**
* @param OnStart $server
* @throws ConfigException * @throws ConfigException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function register(OnStart $server) public function register(OnStart $server)
{ {
@@ -187,6 +194,7 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa
* @param array $handler * @param array $handler
* @param $data * @param $data
* @return array * @return array
* @throws \ReflectionException
*/ */
private function handler(array $handler, $data): array private function handler(array $handler, $data): array
{ {