Jelix 1.6.40

jXmlRpc
in package

object to encode decode some XMl-RPC request and XMl-RPC response

Tags
subpackage

utils

see
http://www.xmlrpc.com/spec

Table of Contents

decodeRequest()  : array<string|int, mixed>
decode an xmlrpc request
decodeResponse()  : mixed
decode an xmlrpc response
encodeFaultResponse()  : string
encode an xmlrpc error response
encodeRequest()  : string
encode an xmlrpc request
encodeResponse()  : string
encode an xmlrpc response
__construct()  : mixed
_decodeValue()  : mixed
deserialize a xmlrpc content to a php value
_encodeValue()  : string
serialize a php value into xmlrpc format

Methods

decodeRequest()

decode an xmlrpc request

public static decodeRequest(string $xmlcontent) : array<string|int, mixed>
Parameters
$xmlcontent : string

the content of the request, in xmlrpc format

Return values
array<string|int, mixed>

first element content the method name to execute second element content parameters

decodeResponse()

decode an xmlrpc response

public static decodeResponse(string $xmlcontent) : mixed
Parameters
$xmlcontent : string

the content of the response, in xmlrpc format

Return values
mixed

data stored into the response

encodeFaultResponse()

encode an xmlrpc error response

public static encodeFaultResponse(string $code, string $message[, string $charset = '' ]) : string
Parameters
$code : string

the error code

$message : string
$charset : string = ''

the charset to use

Return values
string

the xmlrpc response

encodeRequest()

encode an xmlrpc request

public static encodeRequest(string $methodname, array<string|int, mixed> $params[, string $charset = '' ]) : string
Parameters
$methodname : string
$params : array<string|int, mixed>

method parameters

$charset : string = ''
Return values
string

xmlrpc request

encodeResponse()

encode an xmlrpc response

public static encodeResponse(mixed $params[, string $charset = '' ]) : string
Parameters
$params : mixed

the value to stored into the response

$charset : string = ''

the charset to use

Return values
string

the xmlrpc response

__construct()

private __construct() : mixed
Return values
mixed

_decodeValue()

deserialize a xmlrpc content to a php value

private static _decodeValue(SimpleXMLElement $valuetag) : mixed
Parameters
$valuetag : SimpleXMLElement

xmlrpc content

Return values
mixed

the php value

_encodeValue()

serialize a php value into xmlrpc format

private static _encodeValue(mixed $value) : string
Parameters
$value : mixed

a value

Return values
string

xmlrpc content

Search results