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
Return values
bool —false on failure
createPayload()
public
createPayload([mixed $charset_encoding = '' ]) : mixed
Parameters
- $charset_encoding : mixed = ''
Tags
getNumParams()
Returns the number of parameters in the messge.
public
getNumParams() : int
Tags
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
Return values
xmlrpcval —the i-th parameter
kindOf()
public
kindOf() : mixed
Tags
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
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
Return values
xmlrpcrespparseResponseFile()
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
Return values
xmlrpcrespparseResponseHeaders()
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
serialize()
Returns xml representation of the message. XML prologue included
public
serialize([mixed $charset_encoding = '' ]) : string
Parameters
- $charset_encoding : mixed = ''
Tags
Return values
string —the xml representation of the message, xml prologue included
xml_footer()
public
xml_footer() : mixed
Tags
xml_header()
public
xml_header([mixed $charset_encoding = '' ]) : mixed
Parameters
- $charset_encoding : mixed = ''