Documentation

xmlrpcmsg
in package

Table of Contents

Properties

$content_type  : mixed
$debug  : mixed
$methodname  : mixed
$params  : mixed
$payload  : mixed

Methods

__construct()  : mixed
addParam()  : bool
Add a parameter to the list of parameters to be used upon method invocation
createPayload()  : mixed
getNumParams()  : int
Returns the number of parameters in the messge.
getParam()  : xmlrpcval
Returns the nth parameter in the message. The index zero-based.
kindOf()  : mixed
method()  : string
Gets/sets the xmlrpc method to be invoked
parseResponse()  : xmlrpcresp
Parse the xmlrpc response contained in the string $data and return an xmlrpcresp object.
parseResponseFile()  : xmlrpcresp
Given an open file handle, read all data available and parse it as axmlrpc response.
parseResponseHeaders()  : mixed
Parses HTTP headers and separates them from data.
serialize()  : string
Returns xml representation of the message. XML prologue included
xml_footer()  : mixed
xml_header()  : mixed

Properties

$content_type

public mixed $content_type = 'text/xml'

$debug

public mixed $debug = 0

$methodname

public mixed $methodname

$params

public mixed $params = array()

$payload

public mixed $payload

Methods

__construct()

public __construct(string $meth[, array<string|int, mixed> $pars = 0 ]) : mixed
Parameters
$meth : string

the name of the method to invoke

$pars : array<string|int, mixed> = 0

array of parameters to be paased to the method (xmlrpcval objects)

addParam()

Add a parameter to the list of parameters to be used upon method invocation

public addParam(xmlrpcval $par) : bool
Parameters
$par : xmlrpcval
Tags
access

public

Return values
bool

false on failure

createPayload()

public createPayload([mixed $charset_encoding = '' ]) : mixed
Parameters
$charset_encoding : mixed = ''
Tags
access

private

getNumParams()

Returns the number of parameters in the messge.

public getNumParams() : int
Tags
access

public

Return values
int

the number of parameters currently set

getParam()

Returns the nth parameter in the message. The index zero-based.

public getParam(int $i) : xmlrpcval
Parameters
$i : int

the index of the parameter to fetch (zero based)

Tags
access

public

Return values
xmlrpcval

the i-th parameter

kindOf()

public kindOf() : mixed
Tags
access

private

method()

Gets/sets the xmlrpc method to be invoked

public method([string $meth = '' ]) : string
Parameters
$meth : string = ''

the method to be set (leave empty not to set it)

Tags
access

public

Return values
string

the method that will be invoked

parseResponse()

Parse the xmlrpc response contained in the string $data and return an xmlrpcresp object.

public & parseResponse([string $data = '' ][, bool $headers_processed = false ][, string $return_type = 'xmlrpcvals' ]) : xmlrpcresp
Parameters
$data : string = ''

the xmlrpc response, eventually including http headers

$headers_processed : bool = false

when true prevents parsing HTTP headers for interpretation of content-encoding and consequent decoding

$return_type : string = 'xmlrpcvals'

decides return type, i.e. content of response->value(). Either 'xmlrpcvals', 'xml' or 'phpvals'

Tags
access

public

Return values
xmlrpcresp

parseResponseFile()

Given an open file handle, read all data available and parse it as axmlrpc response.

public & parseResponseFile(mixed $fp) : xmlrpcresp

NB: the file handle is not closed by this function.

Parameters
$fp : mixed
Tags
access

public

todo

add 2nd & 3rd param to be passed to ParseResponse() ???

Return values
xmlrpcresp

parseResponseHeaders()

Parses HTTP headers and separates them from data.

public & parseResponseHeaders(mixed &$data[, mixed $headers_processed = false ]) : mixed
Parameters
$data : mixed
$headers_processed : mixed = false
Tags
access

private

serialize()

Returns xml representation of the message. XML prologue included

public serialize([mixed $charset_encoding = '' ]) : string
Parameters
$charset_encoding : mixed = ''
Tags
access

public

Return values
string

the xml representation of the message, xml prologue included

public xml_footer() : mixed
Tags
access

private

xml_header()

public xml_header([mixed $charset_encoding = '' ]) : mixed
Parameters
$charset_encoding : mixed = ''
Tags
access

private


        
On this page

Search results