| 1 | <?php |
||
| 7 | class JsonRpcRequest implements RpcRequestInterface |
||
| 8 | { |
||
| 9 | const VERSION = '2.0'; |
||
| 10 | |||
| 11 | public $id; |
||
| 12 | public $method; |
||
| 13 | public $attributes; |
||
| 14 | |||
| 15 | public function __construct(array $attributes = []) |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @return int|string |
||
| 22 | */ |
||
| 23 | public function getId() |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param int|string $id |
||
| 30 | */ |
||
| 31 | public function setId($id) |
||
| 35 | |||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function getMethod() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param string $method |
||
| 47 | */ |
||
| 48 | public function setMethod($method) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | public function getVersion() |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @param $key |
||
| 63 | * @return mixed |
||
| 64 | */ |
||
| 65 | public function get($key) |
||
| 69 | |||
| 70 | public function __toString() |
||
| 81 | } |