From b764cc64aaa061f4dfb7465d2a96088f3bd5bb00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 28 Oct 2021 16:58:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiri-gii/GiiJsonRpc.php | 8 +++++++- kiri-note/Mapping.php | 31 +++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 kiri-note/Mapping.php diff --git a/kiri-gii/GiiJsonRpc.php b/kiri-gii/GiiJsonRpc.php index c264a1dc..77122583 100644 --- a/kiri-gii/GiiJsonRpc.php +++ b/kiri-gii/GiiJsonRpc.php @@ -25,6 +25,12 @@ class GiiJsonRpc extends GiiBase namespace Rpc; +use Annotation\Mapping; +use Annotation\Target; +use Rpc\Producers\\' . ucfirst($name) . 'RpcService; + +#[Target] +#[Mapping(' . ucfirst($name) . 'RpcService::class)] interface ' . ucfirst($name) . 'RpcInterface { @@ -91,7 +97,7 @@ use Rpc\\' . ucfirst($name) . 'RpcInterface; #[Target] -#[JsonRpc(method: \''.$name.'\', version: \'2.0\')] +#[JsonRpc(method: \'' . $name . '\', version: \'2.0\')] class ' . ucfirst($name) . 'RpcConsumer extends Controller implements ' . ucfirst($name) . 'RpcInterface { diff --git a/kiri-note/Mapping.php b/kiri-note/Mapping.php new file mode 100644 index 00000000..ccfdc77a --- /dev/null +++ b/kiri-note/Mapping.php @@ -0,0 +1,31 @@ +mapping($class, $this->class); + + return parent::execute($class, $method); + } + +}