Skip to content

Commit 3530ef4

Browse files
author
Sören
committed
Docs
1 parent 68011b2 commit 3530ef4

File tree

7 files changed

+4
-686
lines changed

7 files changed

+4
-686
lines changed

README.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,12 @@ xJsonRPC-PHP is a JSON-RPC library for PHP featuring a client (TODO) and a serve
88

99
There's currently 3 server implementations: Server, WebServer and StdInServer
1010

11-
#### Server
12-
13-
Base class, accepts a JSON string as argument to handle() that is processed as a JSON-RPC request
14-
15-
#### WebServer
16-
17-
Will attempt to read out php://input to get the JSON-RPC request, handle() should be called (without arguments) to make it start processing
18-
19-
#### StdInServer
20-
21-
Does the same as WebServer except it uses php://stdin (command line, etc.) instead of php://input
22-
11+
* `Server` Base class, accepts a JSON string as argument to handle() that is processed as a JSON-RPC request
12+
* `WebServer` Will attempt to read out php://input to get the JSON-RPC request, handle() should be called (without arguments) to make it start processing
13+
* `StdInServer` Does the same as WebServer except it uses php://stdin (command line, etc.) instead of php://input
2314

2415
### Implementing methods
2516

26-
2717
To implement methods you subclass one of the above servers and add methods.
2818
These methods must be public in order to be allowed for server use.
2919

@@ -40,11 +30,9 @@ Example
4030
}
4131

4232
$server = ExampleServer();
43-
$response = $server->handle();
33+
$response = $server->handle('{"id": 1, "method": "echo", "jsonrpc": "2.0", "params": ["hello world"]}');
4434
```
4535

46-
And then you can call the echo method with your preferred JSON-RPC client library by connecting to whatever url you have set-up that calls ``$server->handle()``
47-
4836
## Client
4937

5038
TODO

README.rst

Lines changed: 0 additions & 57 deletions
This file was deleted.

autoload.php

Lines changed: 0 additions & 38 deletions
This file was deleted.

client.php

Lines changed: 0 additions & 253 deletions
This file was deleted.

0 commit comments

Comments
 (0)