-
Notifications
You must be signed in to change notification settings - Fork 29
Advanced functionality
johnstevenson edited this page Sep 26, 2012
·
20 revisions
The library is designed to be flexible. It allows you to substitute the built-in transport mechanism for sending and receiving requests with one of your own. The following transports are used by default:
- the client calls
file_get_contents
using a stream-context - the server reads
php://input
If you find these mechanisms too limiting then you can provide your own by passing them as the second parameter of the JsonRpc\Client
and JsonRpc\Server
constructors, as described below.
Your transport class must contain the following:
- a
$transport->send
public function - a
$transport->output
public property - a
$transport->error
public property