JSONRPC 1.0.0-beta3

Server extends Server
in package
uses EncoderAware, SerializerAware

Tags
todo

implement dispatching of multicall requests, json way

todo

test system.XXX methods, with special care to multicall

todo

support 'notification' calls, i.e. if id is null, echo back nothing

todo

should we override all parent's methods related to multicall which do not work for us?

Table of Contents

Properties

$debug  : mixed
$encoder  : mixed
$functions_parameters_type  : mixed
$phpvals_encoding_options  : array<string|int, mixed>
$responseClass  : mixed
$serializer  : mixed

Methods

getCapabilities()  : array<string|int, array<string|int, mixed>>
getEncoder()  : mixed
getParser()  : Parser
Reimplemented to make us use the correct parser type.
getSerializer()  : mixed
methodNameCallback()  : void
serializeDebug()  : mixed
setEncoder()  : mixed
setSerializer()  : mixed
execute()  : Response
Note: syntax differs from overridden method, by adding an ID param
xml_header()  : string
No xml header generated by the server, since we are sending json.

Properties

$debug

protected mixed $debug = 0

$functions_parameters_type

protected mixed $functions_parameters_type = \PhpXmlRpc\JsonRpc\Helper\Parser::RETURN_JSONRPCVALS

$phpvals_encoding_options

protected array<string|int, mixed> $phpvals_encoding_options = array()

Option used for fine-tuning the encoding the php values returned from functions registered in the dispatch map when the functions_parameters_type member is set to 'phpvals'.

Tags
see
Encoder::encode

for a list of values

$responseClass

protected static mixed $responseClass = '\PhpXmlRpc\JsonRpc\Response'

Methods

getCapabilities()

public getCapabilities() : array<string|int, array<string|int, mixed>>
Tags
todo

if building json-rpc-only webservers, you should at least undeclare the xmlrpc capability: unset($outAr['xmlrpc']);

Return values
array<string|int, array<string|int, mixed>>

getParser()

Reimplemented to make us use the correct parser type.

public getParser() : Parser
Return values
Parser

methodNameCallback()

public methodNameCallback(string $methodName, Parser $xmlParser[, null $parser = null ]) : void
Parameters
$methodName : string
$xmlParser : Parser
$parser : null = null
Tags
throws
NoSuchMethodException

serializeDebug()

public serializeDebug([mixed $charsetEncoding = '' ]) : mixed
Parameters
$charsetEncoding : mixed = ''
Tags
todo

allow to (optionally) send comments as top-level json element, since 99.99% of json parsers will barf on js comments...

setEncoder()

public static setEncoder(mixed $encoder) : mixed
Parameters
$encoder : mixed

setSerializer()

public static setSerializer(mixed $serializer) : mixed
Parameters
$serializer : mixed

execute()

Note: syntax differs from overridden method, by adding an ID param

protected execute(Request|string $req[, array<string|int, mixed> $params = null ][, array<string|int, string> $paramTypes = null ][, mixed $msgID = null ]) : Response
Parameters
$req : Request|string
$params : array<string|int, mixed> = null
$paramTypes : array<string|int, string> = null
$msgID : mixed = null
Tags
throws
Exception
Return values
Response

xml_header()

No xml header generated by the server, since we are sending json.

protected xml_header([string $charsetEncoding = '' ]) : string

this method was moved to the Response class

Parameters
$charsetEncoding : string = ''
Return values
string

        
On this page

Search results