1 | <?php namespace Comodojo\RpcClient\Traits; |
||
21 | trait Protocol { |
||
22 | |||
23 | /** |
||
24 | * Supported RPC protocols |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | protected static $supported_protocols = ["XML", "JSON"]; |
||
29 | |||
30 | /** |
||
31 | * RPC protocol |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | private $protocol = 'XML'; |
||
36 | |||
37 | /** |
||
38 | * Set RPC protocol |
||
39 | * |
||
40 | * @param string $protocol |
||
41 | * RPC protocol |
||
42 | * |
||
43 | * @return self |
||
44 | * @throws Exception |
||
45 | */ |
||
46 | 24 | public function setProtocol($protocol) { |
|
59 | |||
60 | /** |
||
61 | * Get RPC protocol |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | 63 | public function getProtocol() { |
|
70 | |||
71 | } |
||
72 |