| 1 | <?php |
||
| 8 | class RpcResponse implements RpcResponseInterface |
||
| 9 | { |
||
| 10 | const VERSION = '2.0'; |
||
| 11 | |||
| 12 | public $id; |
||
| 13 | public $method; |
||
| 14 | public $attributes; |
||
| 15 | public $error; |
||
| 16 | |||
| 17 | public function __construct($id = null, $method = null, array $attributes = [], RpcGenericErrorException $error = null) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @return int|string |
||
| 27 | */ |
||
| 28 | public function getId() |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param int|string $id |
||
| 35 | */ |
||
| 36 | public function setId($id) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public function getMethod() |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param string $method |
||
| 51 | */ |
||
| 52 | public function setMethod($method) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | public function getVersion() |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return null|array |
||
| 67 | */ |
||
| 68 | public function getError() |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @param RpcGenericErrorException $error |
||
| 75 | */ |
||
| 76 | public function setError(RpcGenericErrorException $error) |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @param $key |
||
| 83 | * @return mixed |
||
| 84 | */ |
||
| 85 | public function get($key) |
||
| 89 | |||
| 90 | public function export() |
||
| 105 | } |