Files
kiri-rpc/src/Annotation/JsonRpc.php
T

35 lines
614 B
PHP
Raw Normal View History

2021-10-26 18:58:09 +08:00
<?php
namespace Kiri\Rpc\Annotation;
2021-10-28 10:52:09 +08:00
use Annotation\Attribute;
use Http\Handler\Router;
use Kiri\Kiri;
#[\Attribute(\Attribute::TARGET_CLASS)] class JsonRpc extends Attribute
2021-10-26 18:58:09 +08:00
{
/**
* @param string $method
* @param string $version
*/
2021-10-28 10:52:09 +08:00
public function __construct(public string $method, public string $version = '2.0', public string $protocol = 'json')
2021-10-26 18:58:09 +08:00
{
}
2021-10-28 10:52:09 +08:00
/**
* @param mixed $class
* @param mixed|string $method
* @return mixed
*/
public function execute(mixed $class, mixed $method = ''): mixed
{
return parent::execute($class, $method); // TODO: Change the autogenerated stub
}
2021-10-26 18:58:09 +08:00
}