jJsonRpc

object which encode and decode a jsonrpc request and response

package

jelix

subpackage

utils

link

http://json-rpc.org/index.xhtml

Methods

__construct

__construct() 

decode a request of json xmlrpc

decodeRequest(string $content) : mixed
static

Arguments

$content

string

Response

mixed

decode a jsonrpc response

decodeResponse(string $content) : mixed
static

Arguments

$content

string

Response

mixed

decoded content

encode a jsonrpc error response

encodeFaultResponse(integer $code, string $message,  $id = 1) : string
static

Arguments

$code

integer

code error

$message

string

error message

$id

Response

string

encoded response

create a request content for a jsonrpc call

encodeRequest(string $methodname, array $params,  $id = 1) : string
static

Arguments

$methodname

string

method of the jsonrcp web service

$params

array

parameters for the methods

$id

Response

string

jsonrcp request content

encode a jsonrpc response

encodeResponse(array $params,  $id = 1) : string
static

Arguments

$params

array

returned value

$id

Response

string

encoded response