phpDocumentor pond
[ class tree: pond ] [ index: pond ] [ all elements ]

Class: xmlrpc_server

Source Location: /qp_inc/_ext/xmlrpc/_xmlrpcs.inc.php

Class xmlrpc_server

Property Summary
mixed   $accepted_charset_encodings  
mixed   $accepted_compression   List of http compression methods accepted by the server for requests.
mixed   $allow_system_funcs  
mixed   $compress_response   When set to true, it will enable HTTP compression of the response, in case the client has declared its support for compression in the request.
mixed   $debug  
mixed   $debug_info  
mixed   $dmap  
mixed   $functions_parameters_type   Defines how functions in dmap will be invokde: either using an xmlrpc msg object or plain php values.
mixed   $response_charset_encoding   charset encoding to be used for response.
mixed   $user_data  

[ Top ]
Method Summary
xmlrpc_server   xmlrpc_server()  
void   add_to_map()   Add a method to the dispatch map
void   echoInput()   A debugging routine: just echoes back the input packet as a string value
string   serializeDebug()   Return a string with the serialized representation of all debug info
xmlrpcresp   service()   Execute the xmlrpc request, printing the response
void   setDebug()   Set debug level of server.

[ Top ]
Properties
mixed   $accepted_charset_encodings = array() [line 485]

[ Top ]
mixed   $accepted_compression = array() [line 481]

List of http compression methods accepted by the server for requests.

NB: PHP supports deflate, gzip compressions out of the box if compiled w. zlib


[ Top ]
mixed   $allow_system_funcs = true [line 483]

[ Top ]
mixed   $compress_response = false [line 476]

When set to true, it will enable HTTP compression of the response, in case the client has declared its support for compression in the request.


[ Top ]
mixed   $debug = 1 [line 471]

[ Top ]
mixed   $debug_info = '' [line 497]

[ Top ]
mixed   $dmap = array() [line 463]

[ Top ]
mixed   $functions_parameters_type = 'xmlrpcvals' [line 469]

Defines how functions in dmap will be invokde: either using an xmlrpc msg object or plain php values.

valid strings are 'xmlrpcvals', 'phpvals' or 'epivals'


[ Top ]
mixed   $response_charset_encoding = '' [line 495]

charset encoding to be used for response.

NB: if we can, we will convert the generated response from internal_encoding to the intended one. can be: a supported xml encoding (only UTF-8 and ISO-8859-1 at present, unless mbstring is enabled), null (leave unspecified in response, convert output stream to US_ASCII), 'default' (use xmlrpc library default as specified in xmlrpc.inc, convert output stream if needed), or 'auto' (use client-specified charset encoding or same as request if request headers do not specify it (unless request is US-ASCII: then use library default anyway). NB: pretty dangerous if you accept every charset and do not have mbstring enabled)


[ Top ]
mixed   $user_data = null [line 499]

[ Top ]
Methods
Constructor xmlrpc_server  [line 505]

  xmlrpc_server xmlrpc_server( [ $dispMap = null], [ $serviceNow = true], array $dispmap, boolean $servicenow  )

Parameters:
array   $dispmap:  the dispatch map withd efinition of exposed services
boolean   $servicenow:  set to false to prevent the server from runnung upon construction
   $dispMap: 
   $serviceNow: 


[ Top ]
add_to_map  [line 706]

  void add_to_map( string $methodname, string $function, [array $sig = null], [string $doc = '']  )

Add a method to the dispatch map

Parameters:
string   $methodname:  the name with which the method will be made available
string   $function:  the php function that will get invoked
array   $sig:  the array of valid method signatures
string   $doc:  method documentation

API Tags:
Access:  public


[ Top ]
echoInput  [line 1218]

  void echoInput( )

A debugging routine: just echoes back the input packet as a string value

DEPRECATED!



[ Top ]
serializeDebug  [line 561]

  string serializeDebug( [string $charset_encoding = '']  )

Return a string with the serialized representation of all debug info

Parameters:
string   $charset_encoding:  the target charset encoding for the serialization

API Tags:
Return:  an XML comment (or two)


[ Top ]
service  [line 590]

  xmlrpcresp service( [string $data = null], [ $return_payload = false]  )

Execute the xmlrpc request, printing the response

Parameters:
string   $data:  the request body. If null, the http POST request will be examined
   $return_payload: 

API Tags:
Return:  the response object (usually not used by caller...)
Access:  public


[ Top ]
setDebug  [line 551]

  void setDebug( integer $in  )

Set debug level of server.

Parameters:
integer   $in:  debug lvl: determines info added to xmlrpc responses (as xml comments)
  1. = no debug info,
  2. = msgs set from user with debugmsg(),
  3. = add complete xmlrpc request (headers and body),
  4. = add also all processing warnings happened during method processing
(NB: this involves setting a custom error handler, and might interfere with the standard processing of the php function exposed as method. In particular, triggering an USER_ERROR level error will not halt script execution anymore, but just end up logged in the xmlrpc response) Note that info added at elevel 2 and 3 will be base64 encoded

API Tags:
Access:  public


[ Top ]