| 1 | <?php |
||
| 10 | class Server |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var JsonRpcService[] |
||
| 14 | */ |
||
| 15 | protected $services = []; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param JsonRpcService $jsonRpcService |
||
| 19 | */ |
||
| 20 | 3 | public function addService(JsonRpcService $jsonRpcService) |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $endpoint |
||
| 27 | * @param string $request |
||
| 28 | */ |
||
| 29 | 3 | public function handle($endpoint, $request) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @return JsonRpcService[] |
||
| 38 | */ |
||
| 39 | 3 | public function services() |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $endpoint |
||
| 46 | * |
||
| 47 | * @return JsonRpcService |
||
| 48 | * |
||
| 49 | * @throws \Exception |
||
| 50 | */ |
||
| 51 | 3 | public function findService($endpoint) |
|
| 59 | } |
||
| 60 |