Moodle REST client.
More...
|
| __construct ($serverurl, $token, $format='xml') |
| Constructor. More...
|
|
| call ($functionname, $params) |
| Execute client WS request with token authentication. More...
|
|
| set_token ($token) |
| Set the token used to do the REST call. More...
|
|
Moodle REST client.
It has been implemented for unit testing purpose (all protocols have similar client)
- Copyright
- 2010 Jerome Mouneyrac
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
webservice_rest_client::__construct |
( |
|
$serverurl, |
|
|
|
$token, |
|
|
|
$format = 'xml' |
|
) |
| |
Constructor.
- Parameters
-
string | $serverurl | a Moodle URL |
string | $token | the token used to do the web service call |
string | $format | returned value format: xml or json |
◆ call()
webservice_rest_client::call |
( |
|
$functionname, |
|
|
|
$params |
|
) |
| |
Execute client WS request with token authentication.
- Parameters
-
string | $functionname | the function name |
array | $params | the parameters of the function |
- Return values
-
◆ set_token()
webservice_rest_client::set_token |
( |
|
$token | ) |
|
Set the token used to do the REST call.
- Parameters
-
string | $token | the token used to do the web service call |
The documentation for this class was generated from the following file: