改名
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
namespace Kiri\Rpc\Annotation;
|
||||
|
||||
use Annotation\Attribute;
|
||||
use Http\Handler\Router;
|
||||
use Kiri\Kiri;
|
||||
use Kiri\Rpc\RpcManager;
|
||||
use ReflectionException;
|
||||
|
||||
#[\Attribute(\Attribute::TARGET_CLASS)] class JsonRpc extends Attribute
|
||||
{
|
||||
@@ -13,6 +13,7 @@ use Kiri\Kiri;
|
||||
/**
|
||||
* @param string $method
|
||||
* @param string $version
|
||||
* @param string $protocol
|
||||
*/
|
||||
public function __construct(public string $method, public string $version = '2.0', public string $protocol = 'json')
|
||||
{
|
||||
@@ -24,10 +25,11 @@ use Kiri\Kiri;
|
||||
* @param mixed $class
|
||||
* @param mixed|string $method
|
||||
* @return mixed
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
public function execute(mixed $class, mixed $method = ''): mixed
|
||||
public function execute(mixed $class, mixed $method = ''): bool
|
||||
{
|
||||
return parent::execute($class, $method); // TODO: Change the autogenerated stub
|
||||
return RpcManager::add($this->method, $class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user