Response
extends Response
in package
uses
SerializerAware
Table of Contents
Properties
- $content_type : mixed
- $id : mixed
- $jsonrpc_version : mixed
- $serializer : mixed
Methods
- __construct() : mixed
- __get() : mixed
- __isset() : mixed
- __set() : mixed
- __unset() : mixed
- getJsonRpcVersion() : string
- getSerializer() : mixed
- id() : mixed
- serialize() : string
- Returns json representation of the response. Sets `payload` and `content_type` properties.
- setJsonRpcVersion() : void
- setSerializer() : mixed
- xml_header() : string
- Reimplemented for completeness.
Properties
$content_type
protected
mixed
$content_type
= 'application/json'
$id
protected
mixed
$id
= null
$jsonrpc_version
protected
mixed
$jsonrpc_version
= \PhpXmlRpc\JsonRpc\PhpJsonRpc::VERSION_2_0
$serializer
protected
static mixed
$serializer
Methods
__construct()
public
__construct(mixed $val[, mixed $fCode = 0 ][, mixed $fString = '' ][, mixed $valType = '' ][, mixed $id = null ][, mixed $httpResponse = null ]) : mixed
Parameters
- $val : mixed
- $fCode : mixed = 0
- $fString : mixed = ''
- $valType : mixed = ''
- $id : mixed = null
- $httpResponse : mixed = null
__get()
public
& __get(mixed $name) : mixed
Parameters
- $name : mixed
__isset()
public
__isset(mixed $name) : mixed
Parameters
- $name : mixed
__set()
public
__set(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
__unset()
public
__unset(mixed $name) : mixed
Parameters
- $name : mixed
getJsonRpcVersion()
public
getJsonRpcVersion() : string
Return values
stringgetSerializer()
public
getSerializer() : mixed
id()
public
id() : mixed
serialize()
Returns json representation of the response. Sets `payload` and `content_type` properties.
public
serialize([string $charsetEncoding = '' ]) : string
Parameters
- $charsetEncoding : string = ''
-
the charset to be used for serialization. if null, US-ASCII is assumed
Return values
string —the json representation of the response
setJsonRpcVersion()
public
setJsonRpcVersion(string $jsonrpcVersion) : void
Parameters
- $jsonrpcVersion : string
setSerializer()
public
static setSerializer(mixed $serializer) : mixed
Parameters
- $serializer : mixed
xml_header()
Reimplemented for completeness.
public
xml_header([string $charsetEncoding = '' ]) : string
Parameters
- $charsetEncoding : string = ''