JSONRPC 1.0.0

Serializer
in package
uses CharsetEncoderAware, LoggerAware

Tags
todo

implement a CharsetEncoderAware trait (as soon as there is a 2nd user of Charset)

Table of Contents

Properties

$dateTimeFormat  : string

Methods

getCharsetEncoder()  : Charset
Reimplemented to make us use the correct parser type.
serializeRequest()  : string
serializeResponse()  : string
Serialize a Response as json.
serializeValue()  : string
Serialize a json-rpc Value (or xml-rpc Value) as json.

Properties

$dateTimeFormat

protected string $dateTimeFormat = 'Ymd\TH:i:s'

used when serializing Value objs of type datetime, which is a feature from xml-rpc not found in json-rpc

Methods

getCharsetEncoder()

Reimplemented to make us use the correct parser type.

public getCharsetEncoder() : Charset
Return values
Charset

serializeRequest()

public serializeRequest(Request $req[, string $charsetEncoding = '' ][, mixed $id = null ]) : string
Parameters
$req : Request
$charsetEncoding : string = ''
$id : mixed = null

to be used only for \PhpXmlRpc\Request, as PhpXmlRpc\JsonRpc\Request do have an Id already

Return values
string

serializeResponse()

Serialize a Response as json.

public serializeResponse(Response $resp[, string $charsetEncoding = '' ][, mixed $id = null ]) : string

Moved outside the corresponding class to ease multi-serialization of xml-rpc response objects.

Parameters
$resp : Response
$charsetEncoding : string = ''
$id : mixed = null

to be used only for \PhpXmlRpc\Response, as PhpXmlRpc\JsonRpc\Response do have an Id already

Tags
throws
Exception
Return values
string

serializeValue()

Serialize a json-rpc Value (or xml-rpc Value) as json.

public serializeValue(Value $value[, string $charsetEncoding = '' ]) : string

Moved outside the corresponding class to ease multi-serialization of xml-rpc value objects

Parameters
$value : Value
$charsetEncoding : string = ''
Return values
string

        
On this page

Search results