Methods summary
public
|
#
xmlrpcmsg( string $meth, array $pars = 0 )
Parameters
- $meth
string $meth the name of the method to invoke
- $pars
array $pars array of parameters to be paased to the method (xmlrpcval objects)
|
public
|
|
public
|
|
public
string
|
#
method( string $meth = '' )
Gets/sets the xmlrpc method to be invoked
Gets/sets the xmlrpc method to be invoked
Parameters
- $meth
string $meth the method to be set (leave empty not to set it)
Returns
string the method that will be invoked
|
public
string
|
#
serialize( mixed $charset_encoding = '' )
Returns xml representation of the message. XML prologue included
Returns xml representation of the message. XML prologue included
Returns
string the xml representation of the message, xml prologue included
|
public
boolean
|
#
addParam( xmlrpcval $par )
Add a parameter to the list of parameters to be used upon method
invocation
Add a parameter to the list of parameters to be used upon method
invocation
Parameters
Returns
boolean false on failure
|
public
xmlrpcval
|
#
getParam( integer $i )
Returns the nth parameter in the message. The index zero-based.
Returns the nth parameter in the message. The index zero-based.
Parameters
- $i
integer $i the index of the parameter to fetch (zero based)
Returns
|
public
integer
|
#
getNumParams( )
Returns the number of parameters in the messge.
Returns the number of parameters in the messge.
Returns
integer the number of parameters currently set
|
public
xmlrpcresp
&
|
#
parseResponseFile( mixed $fp )
Given an open file handle, read all data available and parse it as axmlrpc
response. NB: the file handle is not closed by this function. NNB: might have
trouble in rare cases to work on network streams, as we
check for a read of 0 bytes instead of feof($fp).
But since checking for feof(null) returns false, we would risk an
infinite loop in that case, because we cannot trust the caller
to give us a valid pointer to an open file...
Given an open file handle, read all data available and parse it as axmlrpc
response. NB: the file handle is not closed by this function. NNB: might have
trouble in rare cases to work on network streams, as we check for a read of 0
bytes instead of feof($fp). But since checking for feof(null) returns false, we
would risk an infinite loop in that case, because we cannot trust the caller to
give us a valid pointer to an open file...
Returns
Todo
add 2nd & 3rd param to be passed to ParseResponse() ???
|
public
xmlrpcresp
&
|
#
parseResponse( string $data = '', boolean $headers_processed = false, string $return_type = 'xmlrpcvals' )
Parse the xmlrpc response contained in the string $data and return an
xmlrpcresp object.
Parse the xmlrpc response contained in the string $data and return an
xmlrpcresp object.
Parameters
- $data
string $data the xmlrpc response, eventually including http headers
- $headers_processed
boolean $headers_processed when true prevents parsing HTTP headers for interpretation of
content-encoding and consequent decoding
- $return_type
string $return_type decides return type, i.e. content of response->value(). Either
'xmlrpcvals', 'xml' or 'phpvals'
Returns
|