Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Protected Member Functions | List of all members
webservice_xmlrpc_server Class Reference

XML-RPC service server implementation. More...

Inheritance diagram for webservice_xmlrpc_server:

Public Member Functions

 __construct ($authmethod)
 Contructor. More...
 

Protected Member Functions

 fetch_input_content ()
 Fetch content from the client. More...
 
 generate_error ($ex, $faultcode=404)
 Generate the XML-RPC fault response. More...
 
 parse_request ()
 This method parses the request input, it needs to get: 1/ user authentication - username+password or token 2/ function name 3/ function parameters.
 
 prepare_response ()
 Prepares the response.
 
 send_error ($ex=null)
 Send the error information to the WS client. More...
 
 send_headers ()
 Sends the headers for the XML-RPC response.
 
 send_response ()
 Send the result of function call to the WS client.
 

Detailed Description

XML-RPC service server implementation.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Since
Moodle 2.0

Constructor & Destructor Documentation

◆ __construct()

webservice_xmlrpc_server::__construct (   $authmethod)

Contructor.

Parameters
string$authmethodauthentication method of the web service (WEBSERVICE_AUTHMETHOD_PERMANENT_TOKEN, ...)

Member Function Documentation

◆ fetch_input_content()

webservice_xmlrpc_server::fetch_input_content ( )
protected

Fetch content from the client.

Return values
string

◆ generate_error()

webservice_xmlrpc_server::generate_error (   $ex,
  $faultcode = 404 
)
protected

Generate the XML-RPC fault response.

Parameters
Exception | Throwable$exThe exception.
int$faultcodeThe faultCode to be included in the fault response
Return values
stringThe XML-RPC fault response xml containing the faultCode and faultString.

◆ send_error()

webservice_xmlrpc_server::send_error (   $ex = null)
protected

Send the error information to the WS client.

Parameters
Exception$ex

The documentation for this class was generated from the following file: