PHPXMLRPC-EXTRAS

JSRpcServer extends Server
in package

Tags
todo

if we fronted the json-rpc server instead of subclassing it, we might be able to easily use all this magic with both xml-rpc and json-rpc protocols in one class...

Table of Contents

Properties

$jsLibsPath  : string
$jsLibsType  : string
$selfUrl  : string

Methods

__construct()  : mixed
Override base class creator, since we take care of either executing or just preparing the server (this means on creating class we should either execute-and-die or basically do nothing. Use $servicenow=false only for debugging)
importMethods2JS()  : void
Echo js code that wraps calls to server.

Properties

$jsLibsPath

public string $jsLibsPath = 'https://cdn.jsdelivr.net/npm/@jsxmlrpc/jsxmlrpc@0.6/lib/index.js'

default url of jsxmlrpc lib

$jsLibsType

public string $jsLibsType = 'jsxmlrpc'

Javascript lib in use: only 'jsxmlrpc' supported atm

Methods

__construct()

Override base class creator, since we take care of either executing or just preparing the server (this means on creating class we should either execute-and-die or basically do nothing. Use $servicenow=false only for debugging)

public __construct([mixed $dispatchMap = null ][, mixed $serviceNow = true ]) : mixed
Parameters
$dispatchMap : mixed = null
$serviceNow : mixed = true

importMethods2JS()

Echo js code that wraps calls to server.

public importMethods2JS([array<string|int, mixed>|null $methodList = null ]) : void

Note that method names with a . will not work!

Parameters
$methodList : array<string|int, mixed>|null = null

list of methods to be wrapped. Null = all server methods (except system.XXX methods)


        
On this page

Search results