|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct ($authmethod, $restformat= 'xml') | |
Protected Member Functions | |
| parse_request () | |
| send_response () | |
| send_error ($ex=null) | |
| generate_error ($ex) | |
| send_headers () | |
Static Protected Member Functions | |
| static | xmlize_result ($returns, $desc) |
Protected Attributes | |
| $restformat | |
REST service server implementation.
Definition at line 32 of file locallib.php.
| __construct | ( | $ | authmethod, |
| $ | restformat = 'xml' |
||
| ) |
Contructor
Definition at line 40 of file locallib.php.
| generate_error | ( | $ | ex | ) | [protected] |
Build the error information matching the REST returned value format (JSON or XML)
| exception | $ex |
Definition at line 137 of file locallib.php.


| parse_request | ( | ) | [protected] |
This method parses the $_POST and $_GET superglobals and looks for the following information: 1/ user authentication - username+password or token (wsusername, wspassword and wstoken parameters) 2/ function name (wsfunction parameter) 3/ function parameters (all other parameters except those above)
Reimplemented from webservice_base_server.
Definition at line 55 of file locallib.php.
| send_error | ( | $ | ex = null | ) | [protected] |
Send the error information to the WS client formatted as XML document. Note: the exception is never passed as null, it only matches the abstract function declaration.
| exception | $ex |
Reimplemented from webservice_base_server.
Definition at line 127 of file locallib.php.

| send_headers | ( | ) | [protected] |
Internal implementation - sending of page headers.
Definition at line 162 of file locallib.php.

| send_response | ( | ) | [protected] |
Send the result of function call to the WS client formatted as XML document.
Reimplemented from webservice_base_server.
Definition at line 88 of file locallib.php.

| static xmlize_result | ( | $ | returns, |
| $ | desc | ||
| ) | [static, protected] |
Internal implementation - recursive function producing XML markup.
| mixed | $returns | |
| $desc |
Definition at line 181 of file locallib.php.

$restformat [protected] |
Definition at line 35 of file locallib.php.