Serializer
in package
uses
CharsetEncoderAware, LoggerAware
Tags
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
CharsetserializeRequest()
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
stringserializeResponse()
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
Return values
stringserializeValue()
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 = ''